常见页面元素遮住菜单解决方法
发布时间:2006-07-13 13:49:52 来源: 网友评论 0 条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.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.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.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.flash8.net/images/logo.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="index.asp"></iframe>
设置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.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.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.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.flash8.net/images/logo.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="index.asp"></iframe>
[
- 推荐阅讯
- 用css制作表单并体验亲和力
- CSS初级入门:自定义类别
- CSS的解决IE5/IE5.5/IE6/FF的兼容性问题
- CSS技术结合图像实现动态效果的菜单导航
- 用tabIndex轻松实现网页导航
- 常用DIV+CSS网页制作布局技术技巧
- 引入css样式表的四种方式介绍
- 中文排版CSS心得
- 有关表格边框的css语法整理
- 超级漂亮的表格:彩色背景
- 阅读排行
- 1.如何使用CSS来进行网页排版
- 2.CSS样式表教程-If you love css …
- 3.CSS用样式表美化你的网页
- 4.网页制作:几种所见所得的WEB在线编辑器
- 5.网页常见可用性错误——表单组件错误
- 6.CSS+JavaScript打造超酷右键菜单
- 7.针对浏览器隐藏CSS之九大技巧
- 8.DIV+CSS网页布局入门
- 9.搜索引擎的蜘蛛人(ROBOTS)秘密
- 10.CSS垂直树形下拉菜单
- 专题教程
- Windows Server-Windows Server文档-Windows Server新闻-Windows Ser PostgreSQL-PostgreSQL文档-PostgreSQL新闻-PostgreSQL专家
- WebLogic-WebLogic文档-WebLogic新闻-WebLogic专家 FreeBSD-FreeBSD文档-FreeBSD新闻-FreeBSD专家
- Linux-内核 GUI KDE Gnome DNS FTP 安全 安装-Linux专区 Windows-AD IIS ServerCore 虚拟化 安全 HPC-Windows专区
- 大话G游 专题:手机病毒揭密
- ARP攻击防范与解决方案 路由故障处理手册
