Kaynağa Gözat

小程序:首页自定义样式

panyong 2 yıl önce
ebeveyn
işleme
7dcb3adaed

+ 5 - 2
htmldev/wxMini/pages/home/home.wxml

@@ -14,8 +14,11 @@
 
   <!-- 轮播 -->
   <view class="page-section">
-    <swiper indicator-dots="{{true}}" indicator-color="rgba(151, 209, 79, 1)" indicator-active-color="#FFF"
-            autoplay="{{false}}">
+    <swiper
+      indicator-dots="{{true}}"
+      indicator-color="rgba(151, 209, 79, 1)"
+      indicator-active-color="#FFF"
+      autoplay="{{false}}">
       <block wx:for="{{background}}" wx:key="*this">
         <swiper-item>
           <view class="swiper-item {{item}}">

+ 4 - 4
htmldev/wxMini/pages/home/home.wxss

@@ -38,15 +38,15 @@
 }
 
 .page-section swiper {
-  width: 690rpx;
   height: 270rpx;
-  margin: 0 auto;
-  border-radius: 20rpx;
-  overflow: hidden;
 }
 
 .page-section .swiper-item {
+  width: 690rpx;
   height: 100%;
+  margin: 0 auto;
+  border-radius: 20rpx;
+  overflow: hidden;
 }
 
 .page-section .swiper-item image {