zoukankan      html  css  js  c++  java
  • 伸缩导航条

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
        <style type="text/css">
            body {
                padding0px;
                margin0px;
                backgroundurl(Images/bg3.jpg) no-repeat;
            }
     
            #wrapper {
                min-height600px;
            }
     
            #navigation {
                positionabsolute;
                top0px;
                left0px;
                margin0px;
                padding0px;
                width120px;
                list-stylenone;
            }
     
                #navigation li {
                    positionrelative;
                    floatleft;
                    margin0px;
                    padding0px;
                    height50px;
                    width120px;
                }
     
                    #navigation li a {
                        positionabsolute;
                        displayblock;
                        top0px;
                        left0px;
                        height50px;
                        width120px;
                        line-height50px;
                        text-aligncenter;
                        color#FFFFFF;
                    }
     
                #navigation .nav0 a {
                    background#F50065;
                }
     
                #navigation .nav1 a {
                    background#D60059;
                }
     
                #navigation .nav2 a {
                    background#B0004A;
                }
     
                #navigation .nav3 a {
                    background#F26B00;
                }
     
                #navigation .nav4 a {
                    background#D75F00;
                }
     
                #navigation .nav5 a {
                    background#B24F00;
                }
     
                #navigation .nav6 a {
                    background#6E8F00;
                }
     
                #navigation .nav7 a {
                    background#607D00;
                }
     
                #navigation .nav8 a {
                    background#496100;
                }
     
                #navigation .nav9 a {
                    background#007f9f;
                }
     
                #navigation .nav10 a {
                    background#006b87;
                }
     
                #navigation .nav11 a {
                    background#005065;
                }
        </style>
        <script src="Scripts/jquery-1.9.1.js"></script>
        <script type="text/javascript">
            $(function () {
                var $lists = $("#navigation li:not(.current_page)");
                $lists.children("a").css("left""-120");
     
                //给li注册事件
                $lists.hover(function () {
                    $(this).children("a").animate({ "left": 0 }, "fast");
                }, function () {
                    $(this).children("a").animate({ "left": -120 }, "fast");
                });
     
            })
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <div id="wrapper">
                <ul id="navigation">
                    <li class="nav0 current_page"><a href="#">我的日志</a></li>
                    <li class="nav1"><a title="资源下载" href="#">资源下载</a></li>
                    <li class="nav2"><a title="相册" href="#">相册</a></li>
                    <li class="nav3"><a title="一起走到" href="#">一起走到</a></li>
                    <li class="nav4"><a title="从明天起" href="#">从明天起</a></li>
                    <li class="nav5"><a title="纸飞机" href="#">纸飞机</a></li>
                    <li class="nav6"><a title="下一站" href="#">下一站</a></li>
                    <li class="nav7"><a title="门" href="#"></a></li>
                    <li class="nav8"><a title="人文知识" href="#">人文知识</a></li>
                    <li class="nav9"><a title="标签记录" href="#">标签记录</a></li>
                    <li class="nav10"><a title="友情链接" href="#">友情链接</a></li>
                    <li class="nav11"><a title="联系我们" href="#">联系我们</a></li>
                </ul>
            </div>
        </form>
    </body>
    </html>
     
     
     
     
  • 相关阅读:
    vi 整行 多行 复制与粘贴
    FPGA设计—UVM验证篇 Hello world
    武汉市最大的二手车市场
    vim 使用技巧
    CentOS 7下的软件安装方法及策略
    搜索插件:ack.vim
    Vim插件管理
    【一】 sched.h
    Android USB驱动源码分析(-)
    在Python中反向遍历序列(列表、字符串、元组等)的五种方式
  • 原文地址:https://www.cnblogs.com/jiayue360/p/3168482.html
Copyright © 2011-2022 走看看