DIV实际像素比设定像素大?

来源:百度知道 编辑:UC知道 时间:2024/05/12 12:30:41
CSS:
---------------------------------------------------------------
#left_04{width:196px; height:195px; float:left}
.left_04_top{width:196px; height:11px; background-image:url(../images/menu_04_01.gif); background-repeat:no-repeat; float:left;}
.left_04_mid{width:196px; height:173px; background-image:url(../images/menu_04_03.gif);float:left}
.left_04_bottom{width:196px; height:11px; background-image:url(../images/menu_04_05.gif); background-repeat:no-repeat;float:left}

body:
--------------------------------------------------
<div id="left_04">
<div class="left_04_top"></div>
<div class="left_04_mid"></div>
<div class="left_04_bottom"></div>
</div>

//只有left_04_top会高出一像素,也就是12像素.(在DW中点击它,高度:11px(12px)).图片高是11px;
图片没问题的.
加个overflow:hidden;就好了,可是我还是不明白是怎么回事.

不可能产生这种情况根据以上代码,可能是你先前的定义覆盖或图片多设了一像素,请仔细确定

可能是里面的东西和div的高度不一致

加了overflow:hidden就是溢出了啥