【发布时间】:2011-04-04 14:46:02
【问题描述】:
这很令人沮丧....
<div id="target">
<p>Text to appear in front</p>
</div>
#target {
position: relative;
background: red;
width: 200px;
height: 200px;
padding: 45px;
}
#target:before {
content: "content from before, should be behind #target";
position: absolute;
top: 10%;
left: 10%;
width: 100%;
height: 100%;
background: cyan;
z-index: -1;
}
适用于所有浏览器,除了 IE8...
应该是这样显示的:
但是在 IE8 中你会得到这个:'(
所以问题是如何让它在 IE8 中正常工作?
请在jsfiddle...上提供一个真实工作示例的答案...
This user 有完全相同的问题。他没有得到答案,但this 显然不起作用,因此我请求在jsfiddle 上提供一个工作示例来演示它
【问题讨论】:
标签: html css internet-explorer-8 z-index