<view class="header">
<swiper class="swiper" previous-margin="170rpx" next-margin="170rpx" :current="current" @change="changeSwiper">
<swiper-item class="item" v-for="(item,index) in swiperList" :key="index">
<image :src="item.image" mode="" :class="{'ac':current == index}"></image>
</swiper-item>
</swiper>
</view>
swiperList:[{
image:require('../../static/game/10.png')
},{
image:require('../../static/game/9.png')
},{
image:require('../../static/game/10.png')
}],
.header {
padding-top: 100rpx;
.swiper{
height: 700rpx;
.item{
padding-top: 50rpx;
}
image{
display: block;
width: 372rpx;
height: 586rpx;
margin: auto;
transition: all .5s;
transform: scale(0.9);
}
.ac{
transition: all .5s;
transform: scale(1.2);
}
}
}
标签:uniapp,轮播,..,image,game,static,require,png,3D
From: https://blog.csdn.net/qq_40745143/article/details/144450383