图片

CSS
#sub-nav {
position: absolute;
top: 207px;
left: 16px;
width: 192px;
z-index: 4;
background: url('../img/transparent.png');
overflow: hidden;
}
#logo-buttons-bg {
position: relative;
padding: 0 0 60px 0;
width: 208px;
//background-gradient
z-index: 8;
}
#logo-buttons-bg ul {
padding: 8px 21px;
list-style-type: none;
}jQuery:
var containerHeight = $("#logo-buttons-bg ul").height();
$("#sub-nav").height(containerHeight - 25);我怎么才能修好它?我尝试为var containerHeight添加不同的元素,将25更改为另一个具有特定高度…的CSS元素结果完全一样。
Normalize.css修复了这个问题,多亏了Vucko
发布于 2013-07-18 21:01:34
我在FF和Chrome上也有类似的问题。我正在使用.height并切换到.outerHeight(真)
http://princepthomas.blogspot.com/2011/07/jquery-height-vs-outerheight.html
https://stackoverflow.com/questions/17394309
复制相似问题