swiper不会在swiper-slide div中显示所有dinamic itens

时间:2018-05-02 14:35:44

标签: css swiper

我使用swiper来显示不同的产品类别,在div中使用类swiper-slide,类别的产品以dinamic方式调用。但并非所有产品都显示。即使溢出或高度100%,它也不会显示所有产品。有人可以帮我这个吗?

这是显示产品的代码部分:( div“catalogobody”是产品介绍的地方)

<div class="swiper-container">
    <div class="swiper-pagination" style="top:0px;bottom:0px;"></div>
    <div class="swiper-wrapper">
          <div class="swiper-slide">
            <h2 style="text-align:center;">Placas</h2>
            <div id="catalogo" style="overflow-x:hidden;">
              <label for="rep"></label> <input id="rep" name="rep" type='hidden' class="form-control" value= "<?php echo $secCli;?>" readonly="readonly" autofocus>
              <div id="catalogoBody" ></div>
            </div>
          </div>
          <div class="swiper-slide">
              <h2 style="text-align:center;">Conjuntos</h2>
            <div id="catalogo" style="overflow-x:hidden;">
              <label for="rep"></label> <input id="rep" name="rep" type='hidden' class="form-control" value= "<?php echo $secCli;?>" readonly="readonly" autofocus>
              <div id="catalogoBody2" ></div>
          </div>
          </div>
          <div class="swiper-slide">
              <h2 style="text-align:center;">Modulo 1</h2>
            <div id="catalogo" style="overflow-x:hidden;">
              <label for="rep"></label> <input id="rep" name="rep" type='hidden' class="form-control" value= "<?php echo $secCli;?>" readonly="readonly" autofocus>
              <div id="catalogoBody3" ></div>
          </div>
        </div>
        <div class="swiper-slide">
            <h2 style="text-align:center;">Modulo 2</h2>
          <div id="catalogo" style="overflow-x:hidden;">
            <label for="rep"></label> <input id="rep" name="rep" type='hidden' class="form-control" value= "<?php echo $secCli;?>" readonly="readonly" autofocus>
            <div id="catalogoBody4" ></div>
        </div>
      </div>
</div>

1 个答案:

答案 0 :(得分:0)

有必要在创建产品后添加方法update(),以便swiper可以识别所有产品。