關於層的擋隔問題的探討

來源:互聯網
上載者:User
問題 .被Flash擋住
設定Flash的參數:<param name="wmode" value="opaque">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="468" height="60"><param name="movie" value=http://www.163design.net/a/s/"http://pepsi.flash8.net/pepsi46860.swf">
<param name="wmode" value="opaque"><param name="quality" value="high"><embed src=http://www.163design.net/a/s/"http://pepsi.flash8.net/pepsi46860.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="60"></embed></object>
<div style="position:absolute;left:150;top:50;width:100px;height:50px;background:green">
</div>
或者用<param name="wmode" value="transparent">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="468" height="60"><param name="movie" value=http://www.163design.net/a/s/"http://pepsi.flash8.net/pepsi46860.swf">
<param name="wmode" value="transparent"><param name="quality" value="high"><embed src=http://www.163design.net/a/s/"http://pepsi.flash8.net/pepsi46860.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="60"></embed></object>
<div style="position:absolute;left:150;top:50;width:100px;height:50px;background:green">
</div>
2.被圖片擋住
這個估計是因為圖片也放在層中,而圖片所在層的Z軸索引值比該層大,所以被擋住,解決辦法是更改該層的Z軸索引值至比圖片層大。
<div style="position:absolute;left:0;top:20;z-index:2;background:red;width:120px;height:70px">
1<img src=http://www.163design.net/a/s/"http://www.flash8.net/images/logo.gif">
</div>
<div style="position:absolute;left:50;top:50;z-index:2;background:green;width:120px;height:70px">
2<img src=http://www.163design.net/a/s/"http://www.flash8.net/images/logo.gif">
</div>
<div style="position:absolute;left:90;top:80;z-index:2;background:blue;width:120px;height:70px">
3<img src=http://www.163design.net/a/s/"http://www.flash8.net/images/logo.gif">
</div>
3 .被表單控制項擋住
這個目前還沒有完美的解決方案,一般都是在設計排版時就盡量避免這種情況,如果是萬不得已,就在層經過表單控制項時讓表單控制項隱藏,過後再讓它顯示:
<button onClick="oSelect.style.display='none';oLayer.style.display='inline'">顯示層隱藏下拉選項</button><button onClick="oSelect.style.display='inline';oLayer.style.display='none'">顯示下拉選項隱藏層</button>

<div style="position:absolute;left:0;top:50;z-index:2;background:red;width:120px;height:50px">
z-index:1<select id="oSelect"></select>
</div>
<div id="oLayer" style="position:absolute;left:30;top:60;z-index:2;background:green;width:120px;height:70px;display:none">
z-index:2<img src=http://www.163design.net/a/s/"http://www.flash8.net/images/logo.gif">
</div>




相關文章

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。