当前位置: 代码迷 >> ASP.NET >> 急纠结z-index
  详细解决方案

急纠结z-index

热度:8617   发布时间:2013-02-25 00:00:00.0
急在线等,纠结z-index
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>position</title>
<style type="text/css">



.box{ position:relative;z-index:1999;background:#f7f7f7; border:solid 1px #f09; width:200px; height:200px;}
pre{ margin:0; padding:8px; color:#f09; line-height:160%;}
</style>
</head>
<body>
<div class="box" style="top:50px;">
<pre>
position: relative;
background: #f7f7f7;
border: solid 1px #f09;
width: 200px;
height: 200px;
z-index: 4;
top: 50px;
</pre>
</div>
  <iframe width="560" scrolling="no" height="485" style="background:#fff; position:relative; z-index:1;" frameborder="no" src="http://gameroom1.iugame.cn/play.asp?iusiteid=1&s=363333330D0A35363438393835350D0A6173706E65747A6A66403136332E619A336F6D0D0A31393839313132320D0A323031322D362D3420393A33383A3135&gname=17&sname=106"></iframe>
<div class="box" style="top:-180px;">
<pre>
position: relative;
background: #f7f7f7;
border: solid 1px #f09;
width: 200px;
height: 200px;
z-index:6;
top:-180px;
</pre>
</div>
</body>
</html>


火狐好的,ie就是不行

------解决方案--------------------------------------------------------
你说什么问题啊,我这里没有火狐,在IE测试能显示图片,但不知道你说的什么问题?
------解决方案--------------------------------------------------------
ie下加个 iframe来提升div的窗口级别, 避免被之前的iframe遮挡。
  相关解决方案