<!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>
.bigbox
{
display: flex;
background-color: bisque;
height: 500px;
/* text-align: center; */
align-items: center;
justify-content: center;
}
.box1{
display: flex;
height: 100px;
width: 100px;
background-color: red;
align-items: center;
justify-content: center;
}
.box2{
height: 100px;
width: 100px;
background-color: blue;
display: flex;
align-items: center;
justify-content: center;
}
.box3
{
height: 100px;
width: 100px;
background-color: green;
display: flex;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
<div class="bigbox">
hello world
<div class="box1">我是box1</div>
<div class="box2">我是box2</div>
<div class="box3">我是box3</div>
</div>
</body>
</html>
div居中大盒子包小盒子
最新推荐文章于 2024-09-30 14:01:51 发布