<view class="swiper"> <swiper class="banner" indicator-dots indicator-color="rgb(255, 255, 255, 0.5)" indicator-active-color="#fff" autoplay interval="3000" circular> <swiper-item class="bannerItem"> <image src="../../img/swiper01.png" mode="widthFix"></image> </swiper-item> <swiper-item class="bannerItem"> <image src="../../img/swiper02.png" mode="widthFix"></image> </swiper-item> <swiper-item class="bannerItem"> <image src="../../img/swiper03.png" mode="widthFix"></image> </swiper-item> <swiper-item class="bannerItem"> <image src="../../img/swiper04.png" mode="widthFix"></image> </swiper-item> </swiper> </view> <view class="box"> <view class="box1"> <image class="box-img" src="../../img/自取.png"></image> <view class="box-text">自取</view> <view class="box-text2">下单免排队</view> </view> <view class="box2"> <image class="box-img" src="../../img/外卖.png"></image> <view class="box-text">外卖</view> <view class="box-text2">甜蜜送到家</view> </view> </view> <view class="content"> <image src="../../img/奶昔.png"></image> <view class="content-text">好友拼单</view> <view class="content-text2">呼朋唤友一起拼></view> </view> <view class='bottom'> <view class='bottom-son'> <image src="../../img/隐藏新喝法.png"></image> <view class="bottom-son-text">隐藏新喝法</view> </view> <view class='bottom-son'> <image src="../../img/领10元券红包.png"></image> <view class="bottom-son-text">领10元券</view> </view> <view class='bottom-son'> <image src="../../img/0元兑周边.png"></image> <view class="bottom-son-text">0元兑周边</view> </view> </view> 为这个文件编写wxss
时间: 2023-08-14 20:26:23 浏览: 178
可以参考以下的样式代码:
```
.swiper {
height: 300rpx;
margin-bottom: 20rpx;
}
.bannerItem {
width: 100%;
height: 100%;
}
.bannerItem image {
width: 100%;
height: 100%;
}
.box {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-bottom: 20rpx;
}
.box1, .box2 {
display: flex;
flex-direction: column;
align-items: center;
}
.box-img {
width: 80rpx;
height: 80rpx;
}
.box-text {
margin-top: 10rpx;
font-size: 32rpx;
font-weight: bold;
}
.box-text2 {
margin-top: 10rpx;
font-size: 28rpx;
color: #999;
}
.content {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 20rpx;
}
.content image {
width: 150rpx;
height: 150rpx;
margin-right: 20rpx;
}
.content-text {
font-size: 32rpx;
font-weight: bold;
}
.content-text2 {
margin-top: 10rpx;
font-size: 28rpx;
color: #999;
}
.bottom {
display: flex;
justify-content: space-between;
}
.bottom-son {
display: flex;
flex-direction: column;
align-items: center;
}
.bottom-son image {
width: 80rpx;
height: 80rpx;
}
.bottom-son-text {
margin-top: 10rpx;
font-size: 28rpx;
color: #999;
}
```
请注意,这只是其中的一种样式,具体样式需要根据您的需求和设计来进行调整。
阅读全文