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;
}