热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_53051713
油麦菜你好
3 年前
trueweixin_53051713

08
3、组件-swiper和swiper-item组件的基本使用——轮播图
<swiper class="swiper-container">
<!--第一个轮播图-->
<swiper-item>
<view class="item">A</view>
</swiper-item>
<!--第二个轮播图-->
<swiper-item>
<view class="item">B</view>
</swiper-item>
<!--第三个轮播图-->
<swiper-item>
<view class="item">C</view>
</swiper-item>
</swiper>

/* pages/list/list.wxss */
.swiper-container{
height: 150px;
}
.item{
height: 100%;
line-height: 150px;
text-align: center;
}
swiper-item:nth-child(1) .item{
background-color:lightgreen;
}
swiper-item:nth-child(2) .item{
background-color:lightpink;
}
swiper-item:nth-child(3) .item{
background-color:lightskyblue;
}

CSDN App 扫码分享
分享
评论
1
打赏
  • 复制链接
  • 举报
下一条:
没出来@步尔斯特lRf
立即登录