zoukankan      html  css  js  c++  java
  • ul li 美丽菜单

         

     <div id="dh_title" style=" 960px; height: 40px; background: url(dh.gif); text-align: center;">
                <ul class="db_c">
                    <li class="showdh">Menu</li>
                    <li>Menu</li>
                    <li>Menu</li>
                    <li>Menu</li>
                    <li>Menu</li>
                    <li>Menu</li>
                    <li>Menu</li>
                    <li>Menu</li>
                </ul>
            </div>

     <style type="text/css">
            .db_c
            {
                list-style-type: none;
                90%;
                margin-left: 5%;
            }
            .db_c li
            {
                list-style-type: none;
                text-align: center;
                float: left;
                85px;
                height: 25px;
                margin: 6px;
                line-height: 24px;
                border: 0px red solid;
                margin-left: 10px;
                color: White;
                font-weight: bold;
                font-size: small;
            }
            .db_c li:hover
            {
                color: White;
                font-weight: bold;
                font-size: small;
                cursor: pointer;
                background: url(nav_over.gif);
            }
            .showdh
            {
                background: url(nav_over.gif);
            }
        </style>

        <script type="text/javascript">
            $(function() {
                $("ul li", "#dh_title").click(function() {
                    $("ul li", "#dh_title").each(function() {
                        $(this).removeClass("showdh");
                    });
                    $(this).addClass("showdh");
                });
            });
        </script>

  • 相关阅读:
    chapter01
    2019.07.11
    系统进程
    Linex第五-第七章
    Linex第三章第四章
    Linux 系统管理 第二章第三章
    2019/7/24
    使用.htaccess进行浏览器图片文件缓存
    div+css3实现漂亮的多彩标签云,鼠标移动会有动画
    搜索排序的作弊与反作弊,面壁人与智子的巅峰对决
  • 原文地址:https://www.cnblogs.com/ajun/p/2371709.html
Copyright © 2011-2022 走看看