0
除IE外,最內層div內的內容顯示在每個瀏覽器上。爲什麼?我注意到,如果我從.absolute_container
中刪除overflow:hidden
,那麼.item
中的內容會顯示出來,但我需要`overflow:hidden``來保留顯示原因。爲什麼Internet Explorer在帶有溢出的div內製作內容:hidden disappear?
HTML:
<tr>
<td>
<div class="relative">
<div class="absolute">
<div class="absolute_container">
<div class="relative">
<div class="item_wrap">
<div class="item">
// doesn't show up in IE
</div>
</div>
</div>
</div>
</div>
</div>
</td>
</tr>
CSS:
.relative {
position: relative;
width: 100%;
height: 100%;
}
.absolute {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.absolute_container {
position: absolute;
top: 25px;
right: 5px;
bottom: 5px;
left: 5px;
overflow: hidden;
}
.item_wrap {
overflow: hidden;
height: 16px;
font-size: 12px;
clear: right;
white-space: nowrap;
margin-bottom: 1px;
}
.item {
position: relative;
z-index: 999999;
background-color: transparent;
float: left;
}
即使我已經知道你要給這個問題的答案,我仍然要問 - 所有這些div是否真的有必要? – Adam