• CSS多级菜单


    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title></title>
    </head>
    <style type="text/css">
    body{
    background-color: darkgray;
    }
    #nav{
    position: absolute;/*绝对定位*/
    z-index: 1;/*定义层叠顺序,避免页面中部的层(左侧导航条覆盖菜单*/
    left: 0;
    top: 124px;
    700px;
    height: 30px;
    padding: 0px 4px;
    }
    html>/**/body #nav { /*兼容非IE浏览器 能够限制该样式仅在非IE浏览器中被解析
    奇怪的是实测IE也行??*/
    left: 40px; /*左侧距离*/
    top: 112px; /*顶部距离*/
    }
    #nav ul{margin: 0;/*清除下划线,清除缩进*/
    padding: 0;
    }
    #nav li a{
    text-decoration: none;
    }
    #nav li{
    list-style: none;/* 清除项目符号,居中对齐,加粗显示,*/
    text-align: center;
    font-weight: bold;
    float: left;
    }
    #nav .list{
    line-height:20px;
    text-align: left;
    padding: 2px;
    font-weight: normal;
    }
    #nav .list a{
    color: #ff3ac1;
    text-decoration: none;
    float: left;
    100px;
    padding: 3px 5px 0px 0px;
    }
    #nav .list a:hover{
    color: white;
    padding: 3px 3px 0px 20px;
    88px;
    background-color: #FF3AC1;
    }
    #nav .menu1 {
    120px;
    height: auto;
    margin: 6px 4px 0px 0px;
    border: 1px solid #FF3AC1;
    background-color: #F1FBEC;
    color: #FF3AC1;
    padding: 6px 0px 0px 0px;
    cursor: hand;
    overflow-y: hidden;
    filter: Alpha(opacity=70);
    -moz-opacity: 0.7;
    }
    #nav .menu2 {
    120px;
    height: 18px;
    margin: 6px 4px 0px 0px;
    background-color: #F5F5F5;
    color: #999999;
    border: 1px solid #EEE8DD;
    padding: 6px 0px 0px 0px;
    overflow-y: hidden;
    cursor: hand;
    }
    </style>
    <body>
    <ul id="nav">
    <li class="menu2" onmouseover="this.className='menu1'" onmouseout="this.className='menu2'"><a href="#">查看样式表CSS</a>
    <ul class="list">
    <li><a href="#">子菜单1</a></li>
    <li><a href="#">子菜单2</a></li>
    <li><a href="#">子菜单3</a></li>
    </ul>
    </li>
    <li class="menu2" onmouseover="this.className='menu1'" onmouseout="this.className='menu2'"><a href="#">CSS参考资料</a>
    <ul class="list">
    <li><a href="#">子菜单1</a></li>
    <li><a href="#">子菜单2</a></li>
    </ul>
    </li>
    <li class="menu2" onmouseover="this.className='menu1'" onmouseout="this.className='menu2'"><a href="#">常见问题</a>
    <ul class="list">
    <li><a href="#">子菜单1</a></li>
    </ul>
    </li>
    <li class="menu2" onmouseover="this.className='menu1'" onmouseout="this.className='menu2'"><a href="#">投稿</a> </li>
    <li class="menu2" onmouseover="this.className='menu1'" onmouseout="this.className='menu2'"><a href="#">翻译文件</a> </li>
    </ul>
    </div>
    </body>
    </html>

    您可以打开 http://runjs.cn/detail/la7z4tri

  • 相关阅读:
    Python 里的下划线
    浅谈TCP拆包粘包问题
    40 张图带你搞懂 TCP 和 UDP
    头条面试官问:如何保证网络传输的可靠性?这就很尴尬了
    TCP协议灵魂12问,面试总会用得到(建议收藏)
    TCP网络握手
    HTTP1.0、HTTP1.1和HTTP2.0的区别
    面试官:这波HTTP究极combo,你顶得住吗?_chuhe1989的博客-CSDN博客
    腾讯面试官:说一下Android网络知识和框架?
    网络通信必备基础之Http协议&TCP/IP协议(二)
  • 原文地址:https://www.cnblogs.com/wxhhts/p/8602342.html
Copyright © 2020-2023  润新知