zoukankan      html  css  js  c++  java
  • 漂亮的水平导航菜单css+ul li

    图片效果

    用到的背景图片

    代码如下,一定要引用jQuery132.js库哦,别的也可以

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>

        <script src="../jquery132min.js" type="text/javascript"></script>

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

        <style type="text/css">
            ul
            {
                list-style-type: none;
                border: 0px blue solid;
                height: 27px;
                480px;
            }
            ul li
            {
                list-style-type: none;
                float: left;
                74px;
                height: 27px;
                line-height: 27px;
                text-align: center;
                background-color: #CCCCFF;
                background: url(../images/tab.gif);
                background-position: -74px 0px;
            }
            ul li:hover
            {
                cursor: pointer;
            }
            ._lishow
            {
                background: url(../images/tab.gif);
                background-position: 0px 0px;
            }
        </style>
    </head>
    <body>
        <div>
            <ul>
                <li class="_lishow">Menu1</li>
                <li>Menu2</li>
                <li>Menu3</li>
                <li>Menu4</li>
                <li>Menu5</li>
                <li>Menu6</li>
            </ul>
            <br />
        </div>

    </body>
    </html>

  • 相关阅读:
    Xcode waring: no rule to process file *** 警告提示
    Assigning to "id<CALayerDelegate> _Nullable" from incompatible type "ZXCapture *const __strong" 的警告提示信息
    图片编码简介
    oc温习八:static、extern、const 的了解
    转:Objective-C新特性__nonnull和__nullable
    oc温习七:结构体与枚举
    oc温习六:预处理指令
    oc温习五:字符串
    OC温习四:数组
    oc温习三:常用函数
  • 原文地址:https://www.cnblogs.com/ajun/p/2216768.html
Copyright © 2011-2022 走看看