page contents

实现布局中间自适应宽度,左右两栏固定宽度?

轩辕小不懂 发布于 2021-12-09 14:27
阅读 406
收藏 0
分类:WEB前端开发
2607
Nen
Nen
- 程序员

<style>

 .box{

 display:flex;

 }

 .left{

 width: 200px;

 height: 600px;

 background:red;

 }

 .right{

 width: 200px;

 height: 600px;

 background:red;

 }

 .center{

 width: 100%;

 height:600px;

 background:green;

 }

 </style>

</head>

<body>

 <div class="box" >

 <div class="left"></div>

 <div class="center"></div>

 <div class="right"></div>

 </div>

请先 登录 后评论