• 符合css规范的下拉菜单(兼容ff\ie6\ie7)


    <style>
    body{font-size:12px; font-family:"宋体";margin:0;padding:0;}
    #menu {height:29px!important;height:30px;line-height:29px;list-style-type: none;background:#B5DCF9;}
    #menu a {display: block; 80px; text-align:center;}
    #menu a:link {color:#000; text-decoration:none;}
    #menu a:visited {color:#000;text-decoration:none;}
    #menu a:hover {color:#FFF;text-decoration:none;font-weight:bold;}
    #menu li {float: left; 80px;   border-right:1px solid #fff;}
    #menu li a:hover{background:#6699ff;}
    #menu li ul {line-height: 25px; list-style-type: none;text-align:left;
    left: -1860em; 180px; position: absolute;top:15px!important;top:29px;}
    #menu li ul li{float: left; 130px;background: #6699ff;border-top:1px solid #fff}
    #menu li ul a{display: block; 120px!important; 130px;text-align:left;padding-left:10px;}
    #menu li ul a:link {color:#fff; text-decoration:none;}
    #menu li ul a:visited {color:#fff;text-decoration:none;}
    #menu li ul a:hover {color:#000;text-decoration:none;font-weight:normal;background:#B5DCF9;}
    #menu li:hover ul {left: auto;}
    #menu li.sfhover ul {left: auto;}
    #content {clear: left;}
    </style>

    <script type=text/javascript><!--//--><![CDATA[//><!--
    function menuFix() {
    var sfEls = document.getElementById("menu").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>


    <div id="menu">
    <li><a href="http://hi.baidu.com/dpxdqx">彦磊博客首页</a></li>
    <li><a href="http://hi.baidu.com/dpxeqx">网页技术</a>
       <ul>
        <li>
         <a href="http://hi.baidu.com/dpxdqx">DIV+CSS</a>
         <a href="http://hi.baidu.com/dpxdqx">JavaScrip</a>
         <a href="http://hi.baidu.com/dpxdqx">网页基础</a>
        </li>
      
      
       </ul>


    </li>


    </div>

  • 相关阅读:
    php7与其他版本共存
    centos源码安装mysql5.7
    禁用composer update命令
    lumen怎么得到当前Uri的控制器、Action、路由规则
    配置lumen的log为daily模式
    laravel如何打印orm封装的sql语句
    nginx 重写URL尾部斜杠
    Laravel的Nginx重写规则--让路由支持末尾加斜线
    laravel redis存数组并设置过期时间
    openresty
  • 原文地址:https://www.cnblogs.com/sheseido/p/1862341.html
Copyright © 2020-2023  润新知