• 下拉菜单


    <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
    <title>css</title> 
    <style type="text/css"> 
    <!-- 
    *{margin:0;padding:0;border:0;} 
    body { 
    font-family: arial, ??, serif; 
    font-size:12px; 
    } 
    #nav { 
    line-height: 24px; list-style-type: none; background:#666; 
    } 
    #nav a { 
    display: block; width: 80px; text-align:center; 
    } 
    #nav a:link { 
    color:#666; text-decoration:none; 
    } 
    #nav a:visited { 
    color:#666;text-decoration:none; 
    } 
    #nav a:hover { 
    color:#FFF;text-decoration:none;font-weight:bold; 
    } 
    #nav li { 
    float: left; width: 80px; background:#CCC; 
    } 
    #nav li a:hover{ 
    background:#999; 
    } 
    #nav li ul { 
    line-height: 27px; list-style-type: none;text-align:left; 
    left: -999em; width: 180px; position: absolute; 
    } 
    #nav li ul li{ 
    float: left; width: 180px; 
    background: #F6F6F6; 
    } 
    #nav li ul a{ 
    display: block; width: 156px;text-align:left;padding-left:24px; 
    } 
    #nav li ul a:link { 
    color:#666; text-decoration:none; 
    } 
    #nav li ul a:visited { 
    color:#666;text-decoration:none; 
    } 
    #nav li ul a:hover { 
    color:#F3F3F3;text-decoration:none;font-weight:normal; 
    background:#C00; 
    } 
    #nav li:hover ul { 
    left: auto; 
    } 
    #nav li.sfhover ul { 
    left: auto; 
    } 
    #content { 
    clear: left; 
    } 
    --> 
    </style> 
    <script type=text/javascript><!--//--><![CDATA[//><!-- 
    function menuFix() { 
    var sfEls = document.getElementById("nav").getElementsByTagName("li"); 
    for (var i=0; i<sfEls.length; i++) { 
    sfEls[i].onmouseover=function() { 
    this.className+=(this.className.length>0? " ": "") + "sfhover"; 
    } 
    sfEls[i].onMouseDown=function() { 
    this.className+=(this.className.length>0? " ": "") + "sfhover"; 
    } 
    sfEls[i].onMouseUp=function() { 
    this.className+=(this.className.length>0? " ": "") + "sfhover"; 
    } 
    sfEls[i].onmouseout=function() { 
    this.className=this.className.replace(new RegExp("( ?|^)sfhover\b"), 
    ""); 
    } 
    } 
    } 
    window.onload=menuFix; 
    //--><!]]></script> 
    </head> 
    <body> 
    <ul id="nav"> 
    <li><a href="#" _fcksavedurl="#">Menu1</a> 
    <ul> 
    <li><a href="#" _fcksavedurl="#">Menu11</a></li> 
    <li><a href="#" _fcksavedurl="#">Menu12</a></li> 
    <li><a href="#" _fcksavedurl="#">Menu13</a></li> 
    <li><a href="#" _fcksavedurl="#">Menu14</a></li> 
    <li><a href="#" _fcksavedurl="#">Menu15</a></li> 
    <li><a href="#" _fcksavedurl="#">Menu16</a></li> 
    </ul> 
    </li> 
    <li><a href="#" _fcksavedurl="#">Menu2</a> 
    <ul> 
    <li><a href="#" _fcksavedurl="#">Menu21</a></li> 
    <li><a href="#" _fcksavedurl="#">Menu22</a></li> 
    <li><a href="#" _fcksavedurl="#">Menu23</a></li> 
    <li><a href="#" _fcksavedurl="#">Menu24</a></li> 
    <li><a href="#" _fcksavedurl="#">Menu25</a></li> 
    <li><a href="#" _fcksavedurl="#">Menu26</a></li> 
    </ul> 
    </li> 
    </ul> 
    
    </body> 
    </html>
  • 相关阅读:
    Crowdsec:一款面向Linux的现代化协作式大型多人防火墙
    Linux文件操作:利用C语言删除某个目录下的文件
    GitHub 长期被中国人“霸榜”?看完这些榜单,这又是什么新姿势?
    英语不好学不好编程?程序员记忆单词专属诀窍,效果简直要逆天
    谁说女生不适合当程序员?世界第一位程序员,就是女性!
    C语言丨一篇文章带你认识递归与迭代
    C语言进阶丨(七)数组的基本概念和初始化【1】
    赔97.6万元!腾讯一程序员违反竞业协议,三年白干了!
    雪夜思绪
    算法复习(2)递归
  • 原文地址:https://www.cnblogs.com/jianlun/p/4703850.html
Copyright © 2020-2023  润新知