为什么设置 padding-bottom, margin-bottom 的极大值再加上 overflow:hidden 就可以等高呢
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>等高布局-02</title>
<style>
.parent{
overflow: hidden;
}
.left, .right{
width: 300px;
float: left;
padding-bottom: 9999px;
/* 向上移动 */
margin-bottom: -9999px;
}
.left{
background-color: tomato;
}
.right{
background-color: teal;
}
</style>
</head>
<body>
<div class="parent">
<div class="left">
left is left
</div>
<div class="right">
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Iusto, rerum. Commodi in aspernatur asperiores reiciendis ipsum ex voluptas amet sequi. Voluptate nulla laborum molestias placeat natus officiis animi officia quas.
</div>
</div>
</body>
</html>