<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{padding: 0px;margin: 0px;}
ul
{
list-style: none;
width: 600px;
border: 1px solid red;
margin: 100px auto;
display: flex;
}
ul>li
{
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
font-size: 30px;
background: red;
}
ul>li:nth-child(2)
{
background: green;
}
ul>li:nth-child(3)
{
background: blue;
}
</style>
</head>
<body>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</body>
</html>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/85b1ea0cc7600ce68b7816ab87742995.png)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{padding: 0px;margin: 0px;}
ul
{
list-style: none;
width: 600px;
border: 1px solid red;
margin: 100px auto;
display: flex;
flex-direction: column-reverse;
}
ul>li{
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
font-size: 30px;
background: red;
}
ul>li:nth-child(2){
background: green;
}
ul>li:nth-child(3){
background: blue;
}
</style>
</head>
<body>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</body>
</html>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/9c734809d1935e0fe152d6bbed5edb1f.png)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{padding: 0px;margin: 0px;}
ul
{
list-style: none;
width: 600px;
border: 1px solid red;
margin: 100px auto;
display: flex;
flex-direction: row;
justify-content: space-around;
}
ul>li{
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
font-size: 30px;
background: red;
}
ul>li:nth-child(2){
background: green;
}
ul>li:nth-child(3){
background: blue;
}
</style>
</head>
<body>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</body>
</html>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/499e3ffd00a9328336843de694f5eee2.png)