使用滚动视图(scroll-view):
WXML页面:
<scroll-view class="scroll_view_vertical" scroll-y> <view class="item">line1</view> <view class="item">line2</view> <view class="item">line3</view> <view class="item">line4</view> <view class="item">line5</view> <view class="item">line6</view> <view class="item">line7</view> <view class="item">line8</view> <view class="item">line9</view> <view class="item">line10</view> <view class="item">line11</view> <view class="item">line12</view> </scroll-view>
WXSS页面:
.scroll_view_vertical{ height: 100%; margin-bottom: 20px; background-color: ghostwhite; } .scroll_view_horizotal{ height: 50px; background-color: whitesmoke; } .item{ height: 50px; }
JSON页面:
{ "window": { "navigationBarTitleText": "scroll_view" } }
时间: 2024-10-09 23:49:37