添加bfc作用演示

This commit is contained in:
= 2024-05-20 14:33:00 +08:00
parent 3fc97c0b45
commit 59de005538

33
html/BFC的作用.html Normal file
View File

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.first {
height: 100px;
background-color: bisque;
}
.bfc {
overflow: hidden;
height: 100px;
background-color: blue;
}
.position {
position: absolute;
height: 30px;
width: 30px;
background-color: #fff;
}
</style>
</head>
<body>
<div class="first"></div>
<div class="bfc">
<div class="position"></div>
</div>
</body>
</html>