html

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
.wrap{
overflow:hidden;
}
.box{
margin-bottom:-9999px;
padding-bottom:9999px;
width:200px;
float:left;
}
.box1{
background:red;
}
.box2{
background:green;
}
</style>
</head>
<body>
<div class="wrap">
<div class="box box1">1222</div>
<div class="box box2">1222221111111111111111111111111111111111111111111112<br><br><br><br><br></div>
</div>
</body>
</html>

效果图

css 等高补偿法

 

相关文章:

  • 2022-12-23
  • 2021-09-19
  • 2021-04-21
  • 2021-11-26
  • 2021-11-28
  • 2021-06-02
  • 2022-12-23
  • 2021-09-23
猜你喜欢
  • 2022-12-23
  • 2021-05-01
  • 2021-04-07
  • 2022-02-20
  • 2021-06-14
  • 2021-10-01
  • 2022-12-23
相关资源
相似解决方案