IE7 似乎显示滚动条,当一个元素上有 position: relative 用于引起滚动条时(例如,如果您关闭 position: relative
就会显示滚动条)。
<div class="box">
<div class="inner box"></div>
</div>
.box {
position : absolute;
top : 5px;
left : 100px;
right : 5px;
height : 100px;
border : 1px solid #000;
}
.inner {
right : auto;
position : relative;
width : 110%;
left : -90px;
}
演示:http://jsfiddle.net/VE9ne/1/
想知道是否有人看到过这个问题并且知道如何修复它?
最佳答案
使用负边距代替负边距
...
left:0;
margin-left:-90px;
关于css - 位置 :relative item WAS out-of-screen 时的 IE7 滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6550787/