注册 登录
编程论坛 ASP技术论坛

CSS菜单问题

gaoshenghua 发布于 2010-12-21 16:38, 557 次点击
只有本站会员才能查看附件,请 登录

怎样将菜单移到最上层。不会弄。。。
请教各位
2 回复
#2
gupiao1752010-12-22 22:36
CSS里有一个z-index:数字;这样的属性可以让数字大的显示在最上面。找到菜单以后设置一下试试!
#3
madpbpl2010-12-23 03:21
给楼主一个例子作参考
程序代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.">
<html xmlns="http://www.">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>div弹出层</title>
<style type="text/css">
* { margin:0; padding:0;}
#x1 {width:100px; height:100px; background-color:Orange;}
#x2 {width:100px; height:100px; position:absolute; top : 100px; left:0px; background-color:Red;z-index:99}
#x3 { width:100px; height:100px; background-color:Blue; }
</style>
<script>
function cha()
{
document.getElementById("x2").style.display="";
}
function cha1()
{
document.getElementById("x2").style.display="none";
}
</script>

</head>
<body>
<div id="x1" onmouseover="javascript:cha();" onmouseout="javascript:cha1();">
第一层
</div>
<div id="x2" style="display:none">第二层</div>
<div id="x3">第三层</div>
</body>
</html>
1