두 개의 DIV가 서로 쌓여 있으며 세 번째 DIV로 묶여 있습니다. 그런 다음 스택 된 DIV 아래에 "빨간색"DIV가 있습니다.IE에서 스택 된 DIV의 공백을 제거하려면 어떻게합니까?
Chrome에서 DIV가 올바르게 표시됩니다. IE6과 IE7에서는 누적 된 DIV와 빨간색 DIV 사이에 공백이 있습니다.
당신이 당신의 CSS에서top: -58
이
<style>
div.imgbox {
position:relative;
top:0;
left:0;
bottom:0;
right:0;
width:103px;
height:58px;
}
div.imgthumb {
position:relative;
background:#000000;
z-index:3;
width:103px;
height:58px;
}
div.imgplay {
position:relative;
top:-58;
color:red;
z-index:4;
}
div.imgplay a {
width:103px;
height:58px;
display:block;
}
div.imgplay img {
width:25px;
height:25px;
}
</style>
<div class="imgbox">
<div class="imgthumb"></div>
<div class="imgplay"><a href="#"><img src="http://freetvpower.com/attachments/Image/play_up.gif" /></a></div>
</div>
<div style="width:103px; height:58px; background-color:red;"></div>
마녀 버전 즉 테스트를 마쳤습니까? 나는 ie9를 가지고 잘 작동하는 것 같다 ... – CrisDeBlonde
ie6과 ie7을 사용했다. – supercoolville