webveuje/teaching/heshubao/flex.html
2021-06-03 10:52:41 +08:00

45 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
/*
flex
*/
*{
margin:0;
padding: 0;
}
.item{
width: 300px;
height: 300px;
background: blue;
border-bottom: 1px solid white;
}
.box{
display: flex; /*声明一个弹性盒子*/
/*内联元素display的默认值是 inline 块级元素的display默认值是block */
/* flex-direction: row<shuiping>/column(shuzhi); 定义主轴方向 */
/* justify-content: start; 定义排列方式*/
/* flex-direction: column; */
/* justify-content: center; */
/* align-items:center; */
/* justify-content: space-around; */
justify-content: space-between;
}
</style>
</head>
<body>
<div class="box">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
</body>
</html>