<div class="wrapper">
<div class="inner">
Why is cut off in Safari?
</div>
</div>
.wrapper{
background-color: red;
width: 200px;
overflow: hidden;
height: 400px;
position: fixed;
}
.inner{
background-color: silver;
padding: 20px;
width: 400px;
height: 200px;
position: fixed !important;
top: 50px;
left: 40px;
}
这是Safari中的错误吗?有任何想法吗?解决方法?
谢谢!-= b =-
[我仅在Safari(6.1 os x)中看到此问题,当父div设置为position:fixed溢出:隐藏,子div设置为position:fixed,并且它的一部分溢出父级时,就会被剪切...
.wrapper{
background-color: red;
padding: 40px;
width: 200px;
height: 400px;
position: fixed;
top: 0;
left: 0;
}
.wrap2{
background-color: yellow;
overflow: hidden;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.inner{
background-color: silver;
padding: 20px;
width: 400px;
height: 200px;
position: fixed !important;
top: 50px;
left: 40px;
}