<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.wrapper{
display: table;
border-spacing: 10px;
}
.wrapper >div{
/* 不设高度 */
display: table-cell;
width: 200px;
border-radius: 4px;
background: red;
border: 1px solid #000;
padding:10px;
}
</style>
</head>
<body>
<div class="wrapper">
<div>colum1<br>sdf1<br>sdf1<br>sdfn 1<br>ssdf1<br>sdf1<br>sdfn 1<br>ssdf1<br>sdf1<br>sdfn 1<br>s df</div>
<div>colum1<br>sdf1<br>sdfn 2</div>
<div>col1<br>s1<br>sdfdf1<br>sdfumn 3</div>
<div>colum1<br>sdfn 4</div>
</div>
</body>
</html>
多列等高:使用table属性实现
最新推荐文章于 2020-12-21 18:15:44 发布