最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jQuery實現(xiàn)移動端Tab選項卡效果

 更新時間:2017年03月15日 11:07:46   作者:艾米  
本篇文章主要介紹了jQuery實現(xiàn)移動端Tab選項卡效果的實例。具有很好的參考價值。下面跟著小編一起來看下吧

效果圖:

代碼如下:

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
 <title>移動端Tab選項卡</title>
 <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
 <script>
  $(function() {
   $(".tab a").click(function() {
    $(this).addClass('curr').siblings().removeClass('curr');
    var index = $(this).index();
    number = index;
    $('.nav .content li').hide();
    $('.nav .content li:eq(' + index + ')').show();
   });
  })
 </script>
 <style>
  *{
   margin: 0;
   padding: 0;
  }
  div, input, textarea, button, a {
   -webkit-tap-highlight-color: rgba(0,0,0,0);
  }
  ul, li, ol{
   list-style: none;
  }
  a {
   color: #323232;
   outline-style: none;
   text-decoration: none;
  }
  .border-b {
   position: relative;
  }
  .border-b:after {
   top: auto;
   bottom: 0;
  }
  .border-t:before, .border-b:after {
   content: '';
   position: absolute;
   left: 0;
   background: #ddd;
   right: 0;
   height: 1px;
   -webkit-transform: scaleY(0.5);
   transform: scaleY(0.5);
   -webkit-transform-origin: 0 0;
   transform-origin: 0 0;
  }
  .nav {
   background-color: #fff;
   text-align: center;
  }
  .nav .tab {
   width: 100%;
   position: relative;
   overflow: hidden;
  }
  .tab a {
   float: left;
   width: 49%;
   height: 2.56rem;
   line-height:2.56rem;
   display: inline-block;
   border-right: 1px solid #e1e1e1;
  }
  .tab a:last-child {
   border-right: 0;
  }
  .tab .curr {
   border-bottom: 2px solid #fc7831;
   color: #fc7831;
  }
  .content ul li {
   display: none;
   padding: 3%;
   width: 94%;
  }
 </style>
</head>
<body>
<div class="nav">
 <div class="tab border-b">
  <a href="javascript:;" rel="external nofollow" rel="external nofollow" class="curr">商品介紹</a>
  <a href="javascript:;" rel="external nofollow" rel="external nofollow" >評價(99)</a>
 </div>
 <div class="content">
  <ul>
   <li style="display: block">商品介紹</li>
   <li>評價</li>
  </ul>
 </div>
</div>
</body>
</html>

以上就是本文的全部內(nèi)容,希望本文的內(nèi)容對大家的學習或者工作能帶來一定的幫助,同時也希望多多支持腳本之家!

相關(guān)文章

最新評論

微山县| 南皮县| 车致| 台南县| 民县| 台前县| 玉屏| 陕西省| 金溪县| 兖州市| 陵川县| 南雄市| 泸西县| 苍南县| 东至县| 崇左市| 黔西县| 泾源县| 尉犁县| 巫溪县| 灵寿县| 莱阳市| 闽清县| 进贤县| 固镇县| 斗六市| 扶风县| 永靖县| 平武县| 翁源县| 东平县| 崇礼县| 凌云县| 沭阳县| 绥德县| 浦城县| 榆林市| 织金县| 洛宁县| 康马县| 大邑县|