swiper属性(具体看官方文档):
微信小程序swiper标签的测试

一:testswiper.wxml的代码如下。testswiper.js自动生成示例代码。

//testswiper.wxml

<view >

<swiper indicator-dots="true" indicator-active-color="#000000" autoplay="{{true}}" interval="2000">
    <swiper-item>
      <view class="swiper_height  bc_yellow"></view>
    </swiper-item>
     
     <swiper-item>
     <view class="swiper_height  bc_red"></view>
    </swiper-item>

     <swiper-item>
        <view class="swiper_height  bc_blue"></view>
    </swiper-item>
</swiper>

</view>

二:testswiper.wxss

//testswiper.wxss
.bc_yellow{
  background-color: yellow;
}
.bc_red{
  background-color: red;
}
.bc_blue{
  background-color: blue;
}

.swiper_height{
  height: 300px;
}

三:app.json上配置页面路径,效果如下
微信小程序swiper标签的测试

相关文章:

  • 2021-10-02
  • 2021-10-28
  • 2021-08-31
  • 2021-09-26
  • 2021-10-28
猜你喜欢
  • 2021-10-27
  • 2021-09-26
  • 2021-09-26
  • 2021-10-15
  • 2021-12-28
  • 2021-09-15
  • 2021-11-30
相关资源
相似解决方案