添加收藏
 系统管理
 联系方式
  汉南在线网页设计HTML/CSS

菜单实例
作  者:汉南居士
关键字:HTML基础



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>汉南在线菜单实例</title>
<style type="text/css">
<!--
.lt {
 background-color: #FFCCFF;
 border-top: 1px none;
 border-right: 2px solid #000000;
 border-bottom: 2px solid #000000;
 border-left: 1px none;
}
.over {
 color: #CC66FF;
 text-decoration: underline;
 background-color: #0099FF;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>
<style type="text/css">
<!--
.out {
 color: #000000;
 text-decoration: none;
}
-->
</style>
<style type="text/css">
<!--
a:link {
 text-decoration: none;
 color: #000000;
}
.hand {
 cursor: hand;
}
-->
</style>
</head>

<body>
<div id="Layer1" style="position:absolute; left:11px; top:41px; width:185px; height:91px; z-index:1; visibility: hidden;" onMouseOut="MM_showHideLayers('Layer1','','hide')" onMouseOver="MM_showHideLayers('Layer1','','show')">
  <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
    <tr>
      <td><table width="185" border="0" cellspacing="0">
          <tr>
            <td bgcolor="#66CCFF" onMouseOver="this.className='over'" onMouseOut="this.className='out'">
              <div align="center"><a href="1">大陆男歌手</a></div></td>
          </tr>
          <tr>
            <td bgcolor="#66CCFF" onMouseOver="this.className='over'" onMouseOut="this.className='out'">
              <div align="center"><a href="2">大陆女歌手</a></div></td>
          </tr>
          <tr>
            <td bgcolor="#66CCFF" onMouseOver="this.className='over'" onMouseOut="this.className='out'">
              <div align="center"><a href="3">港台男歌手</a></div></td>
          </tr>
          <tr>
            <td bgcolor="#66CCFF" onMouseOver="this.className='over'" onMouseOut="this.className='out'">
              <div align="center"><a href="4">港台女歌手</a></div></td>
          </tr>
          <tr>
            <td bgcolor="#66CCFF" onMouseOver="this.className='over'" onMouseOut="this.className='out'">
              <div align="center"><a href="5">其它歌手</a></div></td>
          </tr>
        </table></td>
    </tr>
  </table>
</div>
<table width="758" border="0" bordercolor="#FFCCFF">
 
 
  <tr>
    <td class="lt" onMouseOver="MM_showHideLayers('Layer1','','show')">
<div align="center" class="hand">
        <p>音乐</p>
      </div></td>
    <td class="lt" onMouseOver="MM_showHideLayers('Layer1','','hide')">
<div align="center">电视</div></td>
    <td class="lt"><div align="center">新闻</div></td>
    <td class="lt"><div align="center">娱乐</div></td>
  </tr>
</table>
</body>
</html>



来源:原创
阅读:551
日期:2005-6-19

【 双击滚屏 】 【 推荐朋友 】 【 收藏 】 【 打印 】 【 关闭 】 【 字体: 】 
上一篇:隐藏文件夹的另类办法
下一篇:网络组建基础必备:网线制作

  >> 相关文章
 
  ·滚动字幕代码Marquee用法详解
  ·HTML字体标记及属性
  ·HTML基础知识

5.12汶川大地震遇难同胞默哀 | 汉南在线总站 | 免费电影 | BT电影下载 | 东莞信息网 | 流行购商城

授权使用:汉南在线 http://hnzx.hzwz.net/
经营许可证:陕ICP备05000109号 Powered by:汉南在线
Copyright (c) 2002-2007 汉南在线. All Rights Reserved .