首页 > Web开发 > 详细

css FLEX 实现

时间:2020-07-29 15:21:20      阅读:80      评论:0      收藏:0      [点我收藏+]
<html>
<script>

</script>
<style>
    .main {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content:center;
        border: 1px solid;
        height: 100%;
    }
    .mian1{
        display: flex;
        flex-direction: column;
    }

    .item {
        height: 100%;
        width: 48%;
        background-color: pink;
        margin-right: 10px;
        margin-bottom: 10px;
      
    }
    .itemx{
        height: 45%;
        width: 100%;
        margin-right: 10px;
        margin-bottom: 10px;
        background-color:aqua;
    }
    /* .item1{
        height: 100px;
    } */
</style>
<div>
    <div class="main">
        <div class="item item1">1</div>
        <div class="item">
            <div class="main1">
                <div class="itemx">1</div>
                <div class="itemx">2</div>
            </div>
        </div>
        <!-- <div class="item">3</div> -->
    
    </div>
</div>

</html>

css FLEX 实现

原文:https://www.cnblogs.com/huchaoheng/p/13396452.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!