显然,Internet Explorer(至少到版本 8)在应用过滤器(例如不透明度)时忽略了溢出:可见,导致过滤元素之外的任何内容都被剪裁,就好像使用了溢出:隐藏一样。
这种行为有什么解决方法吗?
下面的示例代码显示了child是如何被容器裁剪的——只有它的右边框和下边框是可见的。
<style type="text/css">
#container {
position:absolute;
left:100px;
top:100px;
width:100px;
height:100px;
border:1px solid black;
filter:alpha(opacity=50);
overflow:visible;
}
#child {
position:relative;
left:-10px;
top:-10px;
width:20px;
height:20px;
border:1px solid red;
}
</style>
<div id="container">
<div id="child"></div>
</div>