swiper 内容无法居中?
//curInfo:0
<swiper class="swiper" current="{{curInfo}}" circular="true" previous-margin="184rpx" next-margin="184rpx"bindchange="changeSwiper">
<swiper-item wx:for="{{3}}" wx:key="item" class="flex-center item_swiper">
<view class="flex-center swiper_info">
<text class="title_50 text_600">{{index}}</text>
</view>
</swiper-item>
</swiper>
.swiper {
width: 100vw;
height: 460rpx;
background-color: #FDF0F7;
border-top: 10rpx solid #111111;
border-bottom: 10rpx solid #111111;
}
.item_swiper {
width: 100% !important;
height: 100% !important;
justify-content: center;
}
.swiper_info {
width: 380rpx !important;
height: 380rpx !important;
background-color: #FEC82E;
border-radius: 100%;
justify-content: center;
}
.swiper_case {
width: 100%;
height: 100%;
}
补充这个
.flex-center { display: flex; justify-content: center; align-items: center; }