Home > WeChat Applet > Mini Program Development > Interpretation and analysis of WeChat applet components: 2. scroll-view (scrollable view area)

Interpretation and analysis of WeChat applet components: 2. scroll-view (scrollable view area)

巴扎黑
Release: 2017-03-19 18:24:07
Original
2350 people have browsed it

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>
Copy after login

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;
}
Copy after login

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>
Copy after login

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;
}
Copy after login

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>
Copy after login

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template