一个效果不错的下拉菜单代码
来源:互联网 发布:游戏手柄测试软件 编辑:程序博客网 时间:2024/04/28 18:54
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<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></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>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<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></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>
- 一个效果不错的下拉菜单代码
- 搜集了几个不错的下拉菜单效果
- jQuery slideToggle轻松实现效果不错的垂直下拉菜单
- jQuery slideToggle轻松实现效果不错的垂直下拉菜单
- 一个不错的js实现的 日期下拉菜单
- 不错的下拉菜单控件
- 一个不错的启动菜单显示屏动画效果
- andriod一个不错的启动菜单显示屏动画效果
- 一个不错的效果
- 一种不错的网页下拉菜单
- 一款比较不错的下拉菜单
- 不错的下拉菜单,分享一下
- 一个不错的,JavaScript代码,显示首页图片幻灯片效果
- 非常不错的一个JS分页效果代码,值得研究
- 很好的菜单下拉效果
- 下拉菜单的手风琴效果
- 简单的菜单下拉效果
- 一个不错的菜单编辑器
- [心情故事]在javaeye上和人一起追忆当年的SLG 一段美好时光亚.....
- 我的汇编语言语言作业
- 回过菲的信----或许从此也没有什么东西可以失去了
- 仿微软风格的按钮演示
- SharpDevelop: 一个开源的c# IDE(可以说是开源的DELPHI)
- 一个效果不错的下拉菜单代码
- [心情故事]有因就有果 本人rp好的一个表现......
- 网页中实现浏览器的最大,最小化和关闭按钮
- 汉字简/繁体转换
- 责任
- 一位老工程师的终告 (推荐)
- [心情故事]一九九九年的年终工作总结——318冒险日志之初心者の道场
- 矢量地图
- [心情故事]有感于同学zdouble的“gf不要垂青,只要垂涎你就可以了。”