2012-09-05 48 views
1

通常,我在使用Firefox時編寫CSS代碼。但是我的代碼在使用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;} 

但是,當我使用鉻瑞士法郎文件是在菜單前面。 我必須改變什麼?

+1

你能後的HTML部分,也? – Mark

+0

@Mark有我的代碼:http://pastebin.com/3E8cyxYy – user1648692

+0

@ user1648692請只提供最終的相關HTML。不是整個PHP文件。 – Chris

回答

0

它不是你的CSS,而是你的SWF對象的問題。您必須將嵌入的wmode設置爲transparent。否則,它會覆蓋所有其他元素。

<object> 
    <embed wmode="transparent" height="550" width="733"> 
</object> 
+0

我已將此代碼添加到的內部。任何事情都改變了。 – user1648692

+0

對不起'不透明''不透明' –

+0

同樣的問題.... :) – user1648692

2

這是一個鉻錯誤。 鉻不能處理與位置的div:固定和溢出:隱藏和該div內的flashobject。 剝離的例子(的wmode,參數是沒有必要有問題):

<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

解決方案:去掉溢出:隱藏