• sweiper做一个tab切换


    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
        <link rel="stylesheet" href="https://unpkg.com/swiper/css/swiper.min.css">  
        <script src="https://unpkg.com/swiper/js/swiper.min.js"> </script>
        <style>
            html, body {
              
            }
            body {
                font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
                font-size: 14px;
                margin: 0;
                padding: 0;
            }
            .swiper-container {
                width: 100%;
                margin-left: auto;
                margin-right: auto;
            }
            .gallery-top {
                height:auto;
                width: 100%;
            }
            .gallery-top .sweiper_content{
                background:#000000;
                text-align: center;
                color:#ffffff;
                height:300px;
            }
            .gallery-thumbs {
                height:100px;
                box-sizing: border-box;
                padding: 10px 0;
            }
            .gallery-thumbs .swiper-slide {
                width: 50%;
                height: 100%;
            }
            .gallery-thumbs .swiper_tab{
                color:#000000;
                text-align: center;
                height:100px;
                line-height:100px;
            }
            .gallery-thumbs .swiper-slide-thumb-active {
                color:#ffffff;
                border-top-left-radius:20px;
                border-top-right-radius: 20px;
                background:#000000;
            }
        
          </style>
    </head>
    <body>
        <!-- 导航 -->
        <div class="swiper-container gallery-thumbs">
            <div class="swiper-wrapper">
                <div class="swiper-slide swiper_tab">注册</div>
                <div class="swiper-slide swiper_tab">已注册</div>
            </div>
        </div>
        <!-- Swiper -->
      <div class="swiper-container gallery-top">
        <div class="swiper-wrapper">
          <div class="swiper-slide sweiper_content">1111111111111111111</div>
          <div class="swiper-slide sweiper_content">222222222222222222</div>
        </div>
        <!-- Add Arrows -->
        <!-- <div class="swiper-button-next swiper-button-white"></div>
        <div class="swiper-button-prev swiper-button-white"></div> -->
      </div>
      
      
    
      <!-- Initialize Swiper -->
      <script>
        //导航
        var galleryThumbs = new Swiper('.gallery-thumbs', {
          spaceBetween: 10,
          slidesPerView: 2,
          freeMode: true,
          watchSlidesVisibility: true,
          watchSlidesProgress: true,
        });
        // 内容
        var galleryTop = new Swiper('.gallery-top', {
          spaceBetween: 10,
        //   navigation: {
        //     nextEl: '.swiper-button-next',
        //     prevEl: '.swiper-button-prev',
        //   },
          thumbs: {
            swiper: galleryThumbs
          }
        });
      </script>
    </body>
    </html>

    。。。

  • 相关阅读:
    商户网站使用第三方支付的大致原理和实现
    ASP.NET MVC中检测浏览器版本并提示下载更新
    如何选择使用IEnumerable, ICollection, IList
    IEnumerable和IQueryable的区别以及背后的ExpressionTree表达式树
    IEnumerable是集合,IEnumerator是集合的迭代器
    ASP.NET MVC中使用Session来保持表单的状态
    在ASP.NET MVC中实现Select多选
    总结ASP.NET MVC视图页使用jQuery传递异步数据的几种方式
    在ASP.NET MVC4中使用Quartz.NET执行定时任务
    委托, 泛型委托,Func<T>和Action<T>
  • 原文地址:https://www.cnblogs.com/fqh123/p/11739409.html
Copyright © 2020-2023  润新知