
div显示在iframe之上的问题,求大神帮助!
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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">
.infos_heard{ position:absolute; background-color:Red; height:33px; width:265px;}
</style>
</head>
<body>
<div id="weather_info">
<div class="infos_heard" style=" z-index:10;">
<div class="weather_top"></div>
<div class="info_top"></div>
</div>
<iframe scrolling="no" height="240" frameborder="0" width="640" src="http://flash.weather.com.cn/sk2/shikuang.swf?id=101271001" style=" position:absolute; z-index:1; width:640px; height:240px;"></iframe>
</div>
</body>
</html>
这里是源代码,我要让infos_heard这个DIV显示在我嵌套的iframe上面,我现在这种写法只有在google中才能实现,IE和其他浏览器都不得行。求大神帮助!css,JS都可以!!! 展开
<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">
.infos_heard{ position:absolute; background-color:Red; height:33px; width:265px;}
</style>
</head>
<body>
<div id="weather_info">
<div class="infos_heard" style=" z-index:10;">
<div class="weather_top"></div>
<div class="info_top"></div>
</div>
<iframe scrolling="no" height="240" frameborder="0" width="640" src="http://flash.weather.com.cn/sk2/shikuang.swf?id=101271001" style=" position:absolute; z-index:1; width:640px; height:240px;"></iframe>
</div>
</body>
</html>
这里是源代码,我要让infos_heard这个DIV显示在我嵌套的iframe上面,我现在这种写法只有在google中才能实现,IE和其他浏览器都不得行。求大神帮助!css,JS都可以!!! 展开
1个回答
展开全部
<div id="weather_info">
<div class="infos_heard">
<div class="weather_top"></div>
<div class="info_top"></div>
</div>
<iframe scrolling="no" height="240" frameborder="0" width="640" src="http://flash.weather.com.cn/sk2/shikuang.swf?id=101271001" style=" position:absolute; z-index:1; width:640px; height:240px;"></iframe>
</div>
#weather_info {
position:relative;
height:240px;
width: 640px;
background:red !important;
}
.infos_heard {
position:absolute;
width:100%;
height:100%;
z-index:10;
}
iframe {
z-index:1;
}
追问
不得行,这种方法只有在谷歌浏览器中才能实现,在IE和360等浏览器中都不行。 我嵌套的iframe里面是个Flash,他始终会在最高级。我又没办法修改属性,又OBJECt引用又不能实现Flash中的相关功能!!!
追答
那可能就没办法了. 我觉得应该跟flash是ActiveObject有关系. 在IE内核的浏览器中, ActiveObject是不存在于元素css的层次结构里面的.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询