Home > Article > WeChat Applet > Interpretation and analysis of WeChat applet components: 2. scroll-view (scrollable view area)
wxml
[XML] Plain text view Copy code
<view class="flex-wrp"> <view class="flex-item red" ></view> <view class="flex-item green" ></view> <view class="flex-item blue" ></view> </view>
wxss
[XML] Plain text view Copy code
.flex-wrp{ height: 100px; display:flex; background-color: #FFFFFF; } .flex-item{ width: 100px; height: 100px; } .red{ background: red; } .green{ background: green; } .blue{ background: blue; }
flex-direction: column:
wxml
[XML] Plain text view Copy code
<view class="flex-wrp column"> <view class="flex-item" style="background: red"></view> <view class="flex-item" style="background: green"></view> <view class="flex-item" style="background: blue"></view> </view>
wxss
[XML] Plain text view Copy code
.column{ flex-direction:column; } .flex-item{ width: 100px; height: 100px; } .flex-wrp{ height: 100px; display:flex; background-color: #FFFFFF; } .red{ background: red; } .green{ background: green; } .blue{ background: blue; }
justify -content: flex-start:
##wxml
[XML]Plain text view Copy code
<view class="flex-wrp flex-start"> <view class="flex-item" style="background: red"></view> <view class="flex-item" style="background: green"></view> <view class="flex-item" style="background: blue"></view> </view>
The above is the detailed content of Interpretation and analysis of WeChat applet components: 2. scroll-view (scrollable view area). For more information, please follow other related articles on the PHP Chinese website!