常见页面元素遮住菜单解决方法
点击次数:24 次 发布日期:2008-11-26 22:36:07 作者:源代码网
|
1.被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://pepsi.flash8.net/pepsi46860.swf"> 源代码网推荐<param name="wmode" value="opaque"><param name="quality" value="high"><embed src="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://pepsi.flash8.net/pepsi46860.swf"> 源代码网推荐<param name="wmode" value="transparent"><param name="quality" value="high"><embed src="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.zzchn.com/Article/UploadPic/2005-7/2005718224221385.gif"> 源代码网推荐</div> 源代码网推荐<div style="position:absolute;left:50;top:50;z-index:2;background:green;width:120px;height:70px"> 源代码网推荐2<img src="http://www.zzchn.com/Article/UploadPic/2005-7/2005718224221385.gif"> 源代码网推荐</div> 源代码网推荐<div style="position:absolute;left:90;top:80;z-index:2;background:blue;width:120px;height:70px"> 源代码网推荐3<img src="http://www.zzchn.com/Article/UploadPic/2005-7/2005718224221385.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.zzchn.com/Article/UploadPic/2005-7/2005718224221385.gif"> 源代码网推荐</div> 源代码网推荐当然还有用优先级别较高的控件来代替层的方法解决,但控件并非是每台机器上都有安装,而且控件的可定制性也差,也就是常说的兼容性问题: 源代码网推荐hhctrl.ocx 源代码网推荐<OBJECT id=hhctrl type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" codebase="<I>file:</I>hhctrl.ocx#Version=4,0,0,24" width=80 height=20> 源代码网推荐<PARAM name="Command" value="Related Topics, MENU"> 源代码网推荐<PARAM name="Button" value="Menu"> 源代码网推荐<PARAM name="Item1" value="[X-Eyes];http://x-lover.com/forums/"> 源代码网推荐<PARAM name="Item2" value="闪客之吧;http://www.flash8.net"> 源代码网推荐<PARAM name="Item3" value="零刻联盟;http://www.linkmeng.com/"> 源代码网推荐<PARAM name="Item4" value="蓝色理想;http://www.blueidea.com/"> 源代码网推荐<PARAM name="Item5" value="<a href="http://www.5d.cn">5D多媒体</a>;http://www.5d.cn"> 源代码网推荐</OBJECT> 源代码网推荐<select></select> 源代码网推荐window.createPopup()窗口(需要IE5.5+支持) 源代码网推荐<script> 源代码网推荐var oPopup = window.createPopup(); 源代码网推荐function showPopupWin(){ 源代码网推荐var oPopBody = oPopup.document.body; 源代码网推荐oPopBody.style.backgroundColor = "green"; 源代码网推荐oPopup.show(50, 120, 180, 65,document.body); 源代码网推荐} 源代码网推荐</script> 源代码网推荐<BUTTON onclick="showPopupWin()">Click Me!</BUTTON><select></select> 源代码网推荐<iframe src="http://www.zzchn.com/edu/20071027/index.asp"></iframe> 源代码网供稿. |
