网状布局

<template>
    <div>
    <div class="wrap5 wrap">
        <div class="left"></div>
        <div class="center">
            网格布局
        </div>
        <div class="right"></div>
    </div>
    </div>
</template>

<script>
    export default {
        
    }
</script>

<style>
      .wrap5{
            display: grid;
            width: 100%;
            grid-template-rows: 200px;
            grid-template-columns: 300px auto 300px;
        }
        .wrap5 .left{   
            background: red;
        }
        .wrap5 .right{  
            background: blue;
        }
        .wrap5 .center{
            background: pink;
        }
</style>
<!-- 比较新的一种布局方式,兼容性没那么好-->
posted @ 2024-02-23 18:08  雨晨*  阅读(25)  评论(0)    收藏  举报