• 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>

  • 相关阅读:
    element-ui中tabs页设置第一个页面不可关闭
    验证实现element-ui树形控件的自定义图标及右键菜单
    vue项目接口地址的定义
    js数组与字符串的相互转换方法
    vue的双向绑定原理及实现
    vue中的懒加载和按需加载
    使用gulp将移动端px转为rem
    百度搜索--jquery
    关于Ajax中http协议
    用nodejs搭建一个简单的服务器
  • 原文地址:https://www.cnblogs.com/ajun/p/2371709.html
Copyright © 2020-2023  润新知