<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
margin: 0;padding: 0;}
/*.box span{
width: 100px;
height: 100px;
background: skyblue;
margin: 3px;
}*/
/*.box1{
width: 300px;
height: 300px;
background: red;
margin: 200px auto;
display:flex;/*设置为弹性盒
}*/
/*.box1 span{
width: 100px;
height: 100px;
background: pink;
margin:auto;
}*/
.box{
width: 600px;
height: 600px;
background: red;
margin: 100px auto;
display:flex;/*设为弹性盒*/
flex-direction:row;/*设置x主轴*/
flex-direction:row-reverse;/*x反向主轴*/
flex-direction:column;/*y为主轴*/
flex-direction:column-reverse;/*y为反向主轴*/
flex-direction:
元素flex的对齐属性
最新推荐文章于 2024-06-11 08:38:44 发布