flex相关布局
文章目录
待补充
一、实现三栏布局
html
<view class="bg">
<text class="left">dhfs</text>
<text class="center">绝代风华地方就是</text>
<text class="right">很费时间</text>
</view>
style
<style lang="scss">
.bg {
width: 100%;
height: 130rpx;
background-color: pink;
display: flex;
.left {
flex: 1;
text-align: center;
}
.center {
flex: 3;
text-align: center;
}
.right {
flex: 1;
text-align: center;
}
}
</style>


评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论