• swiper 的左右箭头放到外面


    <!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>swiper</title>
      <link href="https://cdn.bootcss.com/Swiper/4.3.0/css/swiper.css" rel="stylesheet">
      <script src="https://cdn.bootcss.com/Swiper/4.5.0/js/swiper.min.js"></script>
      <style>
      .swiper-container {
        border: 1px solid red;
         400px;
        height: 400px;
      }
    
      .swiper-slide {
         400px;
        height: 400px;
        background: orange;
      }
    
      .swiper-father {
         500px;
        height: 400px;
        border: 1px solid red;
        position: relative;
      }
      </style>
    </head>
    
    <body>
      <!-- 增加一个father的包裹 -->
      <div class="swiper-father">
        <div class="swiper-container swiper-container1">
          <div class="swiper-wrapper">
            <div class="swiper-slide">slide1</div>
            <div class="swiper-slide">slide2</div>
            <div class="swiper-slide">slide3</div>
          </div>
          <!-- siwper原本的箭头放在这里 -->
          <!-- <div class="swiper-button-prev"></div>
                <div class="swiper-button-next"></div> -->
        </div>
        <!-- 我们把swiper 的箭头放到swiper 外面 -->
        <div class="swiper-button-prev swiper-button-prev1"></div>
        <div class="swiper-button-next swiper-button-next1"></div>
      </div>
      <div class="swiper-father">
        <div class="swiper-container swiper-container2">
          <div class="swiper-wrapper">
            <div class="swiper-slide">slide1</div>
            <div class="swiper-slide">slide2</div>
            <div class="swiper-slide">slide3</div>
          </div>
          <!-- siwper原本的箭头放在这里 -->
          <!-- <div class="swiper-button-prev"></div>
                <div class="swiper-button-next"></div> -->
        </div>
        <!-- 我们把swiper 的箭头放到swiper 外面 -->
        <div class="swiper-button-prev swiper-button-prev2"></div>
        <div class="swiper-button-next swiper-button-next2"></div>
      </div>
      <script>
      var mySwiper = new Swiper('.swiper-container1', {
        direction: 'horizontal',
        loop: false,
        navigation: {
          nextEl: '.swiper-button-next1',
          prevEl: '.swiper-button-prev1',
        },
    
      });
    
      var mySwiper2 = new Swiper('.swiper-container2', {
        direction: 'horizontal',
        loop: false,
        navigation: {
          nextEl: '.swiper-button-next2',
          prevEl: '.swiper-button-prev2',
        },
    
      });
      </script>
    </body>
    
    </html>
  • 相关阅读:
    Ext.FormPanel-----FieldSet的用法
    DAO层,Service层,Controller层、View层
    PageProxy分页的实现
    Layout布局(补充)
    Ext--Layout(布局)
    DirectEvents用法
    Linq的使用
    字符串注入攻击
    winform(C#)里弹出“确定”“取消”对话框
    C#的数组
  • 原文地址:https://www.cnblogs.com/xutongbao/p/11915696.html
Copyright © 2020-2023  润新知