• 漂亮的水平导航菜单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>

  • 相关阅读:
    shell脚本按当前日期输出日志
    bat弹出确认或取消窗口
    bat脚本输出日志
    北京浩赢科技有限公司与好宝多多
    bat延迟执行脚本,利用choice实现定时执行功能
    centos下安装tunctl
    OpenStack Train版 简单部署流程(4)- octavia
    LVM基础
    OpenStack Train版 简单部署流程(3)- ceilometer
    openstack stein
  • 原文地址:https://www.cnblogs.com/ajun/p/2216768.html
Copyright © 2020-2023  润新知