我'试图生成这样的图形: IE7 CSS的z-index
,但我得到:
CSS:
#green { height: 500px; width: 500px; background-color: green; position:absolute;z-index:13; }
#red { height: 300px; width: 300px; background-color: red; position:absolute; z-index:17; }
#blue { height: 400px; width: 400px; background-color: blue; position:absolute; z-index:15;}
HTML:
<div id="blue"></div>
<div id="green">
<div id="red"></div>
</div>
主要的问题是,我需要像上面指定的那样确定html代码。请给我建议我需要实现此功能的CSS代码(必须与IE7 +兼容)。或者,也许JS会为此提供帮助?我会很乐意提供任何建议。
HTML绝对必须这样吗?这将通过编辑HTML很容易解决。 – Kyle