赞
踩
使用scroll-view标签可实现组件滚动标签
- <!--pages/list/list.wxml-->
- <navigation-bar
- title="小程序"
- back="{{false}}"
- color="black" background="#FFF">
- </navigation-bar>
-
- <scroll-view class="container1" scroll-y>
-
- <view>A</view>
-
- <view>B</view>
-
- <view>C</view>
-
- </scroll-view>

- /* pages/list/list.wxss */
- .container1 view{
- width: 100px;
- height: 100px;
- text-align: center;
- line-height: 100px;
- }
-
- .container1 view:nth-child(1){
- background-color: lightcoral;
- }
-
- .container1 view:nth-child(2){
- background-color: lightgreen;
- }
-
- .container1 view:nth-child(3){
- background-color:lightblue;
- }
-
- .container1{
- border: 1px solid lightblue;
- width: 100px;
- height: 100px;
- }

Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。