编程语言
首页 > 编程语言> > 【小程序】轮播图swiper的实例

【小程序】轮播图swiper的实例

作者:互联网

 1、swiper.wxml


<view>

    <swiper class="banner" indicator-dots="true" indicator-color="0,0,0,0.8"
    indicator-active-color="white"
    autoplay="true"
    interval="1500"
    circular="true" >
        <swiper-item>
            <image src="/pages/images/b1.jpg"></image>
        </swiper-item>
        <swiper-item>
            <image src="/pages/images/b2.jpg"></image>
        </swiper-item>
        <swiper-item>
            <image src="/pages/images/b3.jpg"></image>
        </swiper-item>
        <swiper-item>
            <image src="/pages/images/b4.jpg"></image>
        </swiper-item>
    </swiper>
</view>

2、swiper.wxss

/* pages/index/swiper.wxss */
.banner {
    width:100%;
    height:156px;
}
.banner image{
width:100%;
height:100%;
}

标签:轮播,100%,height,width,实例,wxss,banner,swiper
来源: https://blog.csdn.net/dxnn520/article/details/122541762