通常情况下,当我编写css代码时,我正在使用firefox。但是使用chrome时我的代码有问题。
我的固定菜单:
header{
background-color: #2bd5ec;
overflow:hidden;
line-height: 200%;
top:0;
position:fixed;
width:100%;
z-index: 1;
}
当我滚动页面时,我的swf文件在后面。 我的swf文件的css代码。
#swfFile{width: 500px;height: 500px;}
但是当我使用chrome swf文件时,在菜单前面。 我需要改变什么?
答案 0 :(得分:2)
这是一个铬虫。 chrome无法处理具有位置的div:fixed AND overflow:hidden和该div内的flashobject。 剥离的例子(wmode-param不一定有问题):
<html>
<head>
<title>chromebug</title>
</head>
<body>
<div style="min-height:10000px;">CONTENT</div>
<div style="position: fixed;overflow:hidden;background-color: #000000; bottom: 0; left: 0;">
<object type="application/x-shockwave-flash" width='400px;' height='100px' data="banner.swf">
<param name="wmode" value="transparent">
</object>
</div>
</body>
</html>
在线:http://bytepirates.com/cbug.html
解决方案:删除溢出:隐藏
答案 1 :(得分:0)
它不是你的CSS的问题,而是你的swf对象的问题。您必须将嵌入的wmode
设置为transparent
。否则它将覆盖所有其他元素。
<object>
<embed wmode="transparent" height="550" width="733">
</object>