|
From:http://codingforums.com/showthread.php?t=95109
(a) place Flash embed script in <div> container (I use SWFObject.js)[將flash嵌入腳本放到一個div容器中]
(b) add wmode=transparent to Flash embed script[增加wmode=transparent 到flash嵌入腳本]
(c) set <div id="flashcontent"> container with z-index:-1; [將外層容器的z-index設置為-1]
(d) set <body> tag with style .. position:relative;left:0px;top:0px;z-index:0;
(otherwise Firefox does not accept negative z-index)
(e) set floating iframe in container with z-index: 99;[將浮動的iframe在容器中的zindex設置為99]
(f) use CSS to position flashcontent and htmlcontent containers.[使用css來調整flash容器和html容器的位置]
其他方案網上比較多見,不做闡述.在此說下使用第一個方案如何解決:
復制代碼 代碼如下:
var so = new SWFObject("XXX.swf", "flashId", "寬度", "高度", "版本", "背景色");
//設置flash不遮蓋div層
so.addParam("wmode", "opaque");
so.write("flashcontent");
如此設置即可讓flash無法遮蓋住div.
JavaScript技術:關于flash遮蓋div浮動層的解決方法,轉載需保留來源!
鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。