code如下:
<body>
<div class="container">
<div class="item">div>
<div class="item">div>
<div class="item">div>
div>
<style>
.container {
display: flex;
flex-direction: column; /* 设置主轴方向为纵向 */
justify-content: space-between; /* 设置三点间隔距离相等 */
width: 100px;
height: 100px;
background-color: rgb(219, 233, 233);
}
.item {
width: 20px;
height: 20px;
background-color: aqua;
border-radius: 50%;
}
.item:nth-child(1) {
align-self: flex-start;
}
.item:nth-child(2) {
align-self: center;
}
.item:nth-child(3) {
align-self: flex-end;
}
style>
body>