<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.fater {
border: 1px solid red;
width: 300px;
overflow: hidden; /*别加错位置了 给父亲加*/
}
.big {
width: 100px;
height: 200px;
background-color: purple;
float: right;
}
.small {
width: 80px;
height: 80px;
background-color: blue;
float: left;
}
.footer {
width: 400px;
height: 100px;
background-color: pink;
}
</style>
</head>
<body>
<div class="fater">
<div class="big"></div>
<div class="small"></div>
</div>
<div class="footer"></div>
</body>
</html>片
overflow法
最新推荐文章于 2021-03-19 23:19:51 发布