乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      jquery寫的tab切換效果 非常簡單

       昵稱10504424 2015-04-21

      自己寫的一款 tab切換效果,比較簡單,適合新手

      <style type="text/css">
      *{margin:0; padding:0; font-size:12px;}
      ul{list-style:none;}
      ul li a{text-decoration:none; color:#000000;}
      ul li a:hover{text-decoration:underline; color:#cc0000;}
      #con{margin:50px auto; width:960px;}
      .tab_Item{ border:1px solid #d8d9d9; width:348px;}
      .tab_Tit{ background:url(images/bg.jpg) no-repeat scroll left top; height:30px;}
      .tab_Tit h3{ float:left; background:url(images/icon.jpg) no-repeat scroll 0 0; font-weight:bold; margin:8px 0 0 8px; height:22px;font-size:14px;padding-left:12px; color:#333333;}
      .tab_Tit a{float:left; display:block; padding-top:8px; width:56px; height:22px; border-left:1px solid #d8d9d9; text-align:center; cursor:pointer;}
      .tab_Tit a:hover{ background:#fff;text-decoration:underline; color:#cc0000;}
      .tab_Tit .selected{ background:#fff;}
      .tab_Con{background:url(images/bg.jpg) no-repeat scroll 0 -30px; margin:6px 0 0 8px; padding-left:22px; }
      .tab_Con ul{line-height:24px;}
      </style>

      <div class="tab_Item">
      <div class="tab_Tit">
      <h3>文章排行</h3>
      <a class="">333</a>
      <a class="">222</a>
      <a class="selected">111</a>
      </div>
      <div class="tab_Con">
      <ul style="display:none">
      <li>
      <a title="北上廣之外的IT技術人生" target="_blank" href="#">33333333333333</a>
      </li>
      </ul>
      <ul style="display:none">
      <li>
      <a title="給明年依然年輕的我們:道別150萬年薪,開始盒飯生活" target="_blank" href="#">222222222222222</a>
      </li>
      </ul>
      <ul style="display:block">
      <li>
      <a title=""菜鳥"程序員和"大神"程序員差距在哪里" target="_blank" href="#">111111111111</a>
      </li>
      </ul>
      </div>
      </div>

      $(function(){
      $(".tab_Tit a").each(function(index){ //遍歷 a 標簽 給了 index 參數(shù)(索引)
      $(this).mouseover(function(){ //移動到上邊
      $(".tab_Tit a.selected").removeClass("selected"); //移除這個class
      $(this).addClass("selected"); //加上這個class
      $(".tab_Con > ul:visible").hide(); //所有可見的 ul 都隱藏
      $(".tab_Con ul:eq(" + index + ")").show(); //eq 遍歷 ul 根據(jù) .tab_Tit a 的索引顯示
      })
      })
      })

        本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內容均由用戶發(fā)布,不代表本站觀點。請注意甄別內容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內容,請點擊一鍵舉報。
        轉藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多