zoukankan      html  css  js  c++  java
  • 导航条效果的代码

    <div class="all">
        <div class="m1">标题1</div>
        <div class="m2">标题2</div>
        <div class="m3">标题3</div>
        <div class="m4">标题4</div>
        <div class="m5">标题5</div>
        <div class="m6">标题6</div>
        </div>
    
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
        <script type="text/javascript">
        $(document).ready(function () {
        myHide();
        });
        function myHide() {
            //alert("hello");
            //注册事件
            $(".m1").bind('mouseover', m1_mouseover);
            $(".m1").bind('mouseout', m1_mouseout);
            $(".m2").bind('mouseover', m2_mouseover);
            $(".m2").bind('mouseout', m2_mouseout);
            $(".m3").bind('mouseover', m3_mouseover);
            $(".m3").bind('mouseout', m3_mouseout);
            $(".m4").bind('mouseover', m4_mouseover);
            $(".m4").bind('mouseout', m4_mouseout);
            $(".m5").bind('mouseover', m5_mouseover);
            $(".m5").bind('mouseout', m5_mouseout);
            $(".m6").bind('mouseover', m6_mouseover);
            $(".m6").bind('mouseout', m6_mouseout);
        };
        function m1_mouseover() {
            $(".m1").animate({  "100px", height: "30px",fontSize:"22px" }, "fast");
        }
        function m1_mouseout() {
            $(".m1").animate({  "70px", height: "20px", fontSize: "14px" }, "fast");
        }
        function m2_mouseover() {
            $(".m2").animate({  "100px", height: "30px", fontSize: "22px" }, "fast");
        }
        function m2_mouseout() {
            $(".m2").animate({  "70px", height: "20px", fontSize: "14px" }, "fast");
        }
        function m3_mouseover() {
            $(".m3").animate({  "100px", height: "30px", fontSize: "22px" }, "fast");
        }
        function m3_mouseout() {
            $(".m3").animate({  "70px", height: "20px", fontSize: "14px" }, "fast");
        }
        function m4_mouseover() {
            $(".m4").animate({  "100px", height: "30px", fontSize: "22px" }, "fast");
        }
        function m4_mouseout() {
            $(".m4").animate({  "70px", height: "20px", fontSize: "14px" }, "fast");
        }
        function m5_mouseover() {
            $(".m5").animate({  "100px", height: "30px", fontSize: "22px" }, "fast");
        }
        function m5_mouseout() {
            $(".m5").animate({  "70px", height: "20px", fontSize: "14px" }, "fast");
        }
        function m6_mouseover() {
            $(".m6").animate({  "100px", height: "30px", fontSize: "22px" }, "fast");
        }
        function m6_mouseout() {
            $(".m6").animate({  "70px", height: "20px", fontSize: "14px" }, "fast");
        }
        </script>
        <style type="text/css">
        .m1,.m2,.m3,.m4,.m5,.m6
        {
            70px;
            height:20px;
            background-color:#CCCCCC;
            border: thin solid #9999FF;
            font-size:14px;
          }
          .all
          {
            80px;
            height:160px;
            text-align:center;
          }
        </style>
    

  • 相关阅读:
    Linux配置SSH公钥认证与Jenkins远程登录进行自动发布
    在阳台上种花生
    已知传递函数,求幅频响应?
    win8快速锁屏
    word2016怎么让目录索引显示在左边?
    Matlab 瑞利信道仿真
    rayleighchan实现瑞利多径衰落信
    2017电商趋势
    【连载7】二手电商平台的账号与信用体系
    【连载6】二手电商APP的导购功能与关系链机制分析
  • 原文地址:https://www.cnblogs.com/longhuang/p/1744300.html
Copyright © 2011-2022 走看看