如何制作下拉菜单
发布网友
发布时间:2022-04-23 05:28
我来回答
共4个回答
热心网友
时间:2023-07-11 05:06
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
BODY {font-size:9pt;color:white;background-color:yellow}
TABLE{font-size:9pt;color:snow;background-color:darkblue;BORDER-COLLAPSE: collapse;text-align:center}
DIV{font-size:9pt;color:springgreen;background-color:green}
TD{cursor:hand}
FONT {font-size:9pt;color:lime;cursor:hand}
.over {color:gold;background-color:slateblue}
.out{ color:snow;background-color:darkblue}
</style>
<script>
function popmenu(obj1)
{
obj1.className="over";
menu1.style.backgroundColor="slateblue";
menu1.style.borderTopColor="slateblue";
menu1.style.top=obj1.offsetTop+obj1.offsetHeight;
menu2.style.top=obj1.offsetTop+obj1.offsetHeight+10;
menu1.style.left=obj1.offsetLeft+obj1.offsetWidth/2-40;
menu2.style.left=obj1.offsetLeft+obj1.offsetWidth/2-30;
menu1.style.display="";
menu2.style.display="";
}
function menuout(obj1) {
obj1.className="out";
menu1.style.backgroundColor="darkblue";
menu1.style.borderTopColor="darkblue";
}
function menuclear()
{ if (event.toElement.tagName!="FONT")
{
menu1.style.display='none';
menu2.style.display='none';
}
}
function hide()
{menu1.style.display='none';menu2.style.display='none';}
</script>
<title>网页特效|Linkweb.cn/Js|---不错的下拉菜单</title>
</head>
<body topmargin="0" leftmargin="0" onresize="location.reload()">
<script>
for(x=0;x<=document.body.offsetWidth;x+=10){
document.write("<div style='position:absolute;left:"+x+";top:0;height:100%;width:1;font-size:1pt;background-color:gray;border:0;z-index:-2'></div>")
}
for(x=0;x<=document.body.offsetHeight;x+=10) {
document.write("<div style='position:absolute;left:0;top:"+x+";height:1;width:100%;font-size:1pt;background-color:gray;border:0;z-index:-2'></div>")
}
</script>
<div id=menu1 onmouseout="menuclear()" style="position:absolute;text-align:center;color:snow;background-color:slateblue;top:100;left:100;height:200;width:80;display:none;border-style:solid;border-width:1;border-color:cyan;border-top-color:slateblue;z-index:1">
<br>
<script>
for(x=0;x<11;x++){document.write("<font onmouseover=this.style.color='red' onmouseout=this.style.color='lime'>子菜单一</font><br>");}
</script>
</div>
<div id=menu2 style="position:absolute;Filter:Alpha(opacity=40);background-color:black;height:200;width:80;z-index:-1;display:none"></div>
<table border="1" cellspacing="1" width="100%" bordercolor="#00FFFF" style="position: absolute; top: 0" >
<tr>
<td width="16%" onmouseover="popmenu(this)" onmouseout="menuout(this)" onclick="menu1.style.display='none';menu2.style.display='none'" >主页</td>
<td width="16%" onmouseover="popmenu(this)" onmouseout="menuout(this)" onclick="menu1.style.display='none';menu2.style.display='none'">菜单一</td>
<td width="17%" onmouseover="popmenu(this)" onmouseout="menuout(this)" onclick="menu1.style.display='none';menu2.style.display='none'">菜单二</td>
<td width="17%" onmouseover="popmenu(this)" onmouseout="menuout(this)" onclick="menu1.style.display='none';menu2.style.display='none'">菜单三</td>
<td width="17%" onmouseover="popmenu(this)" onmouseout="menuout(this)" onclick="menu1.style.display='none';menu2.style.display='none'">菜单四</td>
<td width="17%" onmouseover="popmenu(this)" onmouseout="menuout(this)" onclick="menu1.style.display='none';menu2.style.display='none'">菜单五</td>
</tr>
</table>
</body>
</html>
参考资料:http://www.jscode.cn/
热心网友
时间:2023-07-11 05:07
首先选择需要下拉菜单的区域,在数据下面点击数据验证,允许改为序列,来源输入我们的内容,用逗号隔开,点击确定即可完成。
热心网友
时间:2023-07-11 05:07
Excel怎么制作下拉菜单?这个视频告诉你!
热心网友
时间:2023-07-11 05:08
Excel如何制作下拉菜单?很简单,让我来教会你!