<!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>
.box{
/* 1设置父元素为flex容器:加上flex属性值 */
display: flex; /* 定义元素是一个flex容器 */
width: 600px;
height: 600px;
border:1px solid red;
/* 默认的主轴是x轴,水平向右 */
/* flex-direction: column; y轴为主轴 垂直向下*/
flex-direction: row-reverse;
}
.box span{
width: 150px;
height: 50px;
background-color: skyblue;
}
</style>
</head>
<body>
<div class="box">
<span>1</span><span>2</span><span>3</span>
</div>
</body>
</html>