码迷,mamicode.com
首页 > 微信 > 详细

微信小程序页面布局

时间:2017-09-15 21:44:38      阅读:707      评论:0      收藏:0      [点我收藏+]

标签:white   img   分享   red   order   布局   bottom   center   width   

技术分享

页面布局:

wcml:
<view class="page">
        <view class="page_hd">
        </view>
        <view class="page_bd">

            <view class="section_nav">
            

                    <view class="left  border_right">
                        酒店
                    </view>

                    <view class="right">
                        <view class="item  border_right border_bottom">酒店1</view>
                        <view class="item   border_bottom">酒店2</view>
                        <view class="item  border_right ">酒店3</view>
                        <view class="item">酒店4</view>
                    </view>
            </view>


             <view class="section_nav">
            

                    <view class="left  border_right">
                        酒店
                    </view>

                    <view class="right">
                        <view class="item  border_right border_bottom">酒店1</view>
                        <view class="item   border_bottom">酒店2</view>
                        <view class="item  border_right ">酒店3</view>
                        <view class="item">酒店4</view>
                    </view>
            </view>

        </view>

</view>

  

wxss:

.section_nav{
    display:flex;
    background:red;
    height:120px;
    font-size:14px;
    color:white;
    margin-bottom:10px;
}

.left{
    width:33.33%;
}
.border_right{
    
    border-right:1px solid #fff;
}
.border_bottom{
    border-bottom:1px solid #fff;
}


.right{
    width:66.67%;
    flex-wrap:wrap;
}
.left, .right{
    display:flex;
    justify-content:center;
    align-items:center;
    box-sizing:border-box;
}
.item{
    width:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    box-sizing:border-box;
    height:60px;
}

 

微信小程序页面布局

标签:white   img   分享   red   order   布局   bottom   center   width   

原文地址:http://www.cnblogs.com/jyxlj/p/7528430.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!