【发布时间】:2010-11-03 22:24:59
【问题描述】:
我有一个相对简单的设计让我感到困惑。它有 4 个大图像,需要贴在左上角、右下角和左下角、右上角。图像非常大,内容容器与它们重叠。有点像这样:
Structure http://www.kalleload.net/uploads/nizyjc/zxyagpfrmjqe.png
我的问题是我的实现在除 IE8 之外的所有主要浏览器中都能正常工作(我刚刚开始尊重)。有没有更好的方法可以做到这一点?
我目前正在使用以下标记:
<div class="corner-top">
<div><img src="./images/top-left-corner.png" /></div>
</div>
<div class="corner-bottom">
<img src="./images/bottom-left-corner.png" />
</div>
<div id="container">
....
</div>
#container {
margin: 60px auto;
width: 488px;
}
.corner-top {
background: url('./images/top-right-corner.png') top right no-repeat;
height: 356px;
min-width: 868px;
overflow: hidden;
position: absolute;
top: 0;
width: 100%;
z-index: -20;
}
.corner-top div {
min-width: 868px;
}
.corner-bottom {
background: url('./images/bottom-right-corner.png') bottom right no-repeat;
bottom: 0;
height: 325px;
min-width: 868px;
overflow: hidden;
position: absolute;
width: 100%;
z-index: -20;
}
.corner-bottom div {
min-width: 868px;
}
【问题讨论】:
-
对quirksmode.org来说可能是个好问题
-
您能否概述一下 IE8 的错误之处,供我们这些不想在未来发现它的人使用?
标签: css