<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
padding: 0;
margin: 0
}
.wrap {
width: 800px;
height: 50px;
display: flex;
overflow: auto;
resize: both;
}
.item {
flex: 1;
color: #f40;
text-align: center;
line-height: 50px;
border: 1px solid blue;
box-sizing: border-box;
}
.item:nth-of-type(2) {
background-color: chartreuse;
flex: 0 0 50%;
}
</style>
</head>
<body>
<div class="wrap">
<div class="item">淘宝</div>
<div class="item">京东</div>
<div class="item">拼多多</div>
</div>
</body>
</html>
三栏弹性盒
最新推荐文章于 2022-11-03 16:27:45 发布