使用 flex 绘制一个三点骰子
实现效果:
.html:
<div class="container">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
.css:
.container {
width: 100px;
height: 100px;
display: flex;
justify-content: space-between;
}
.item {
width: 24px;
height: 24px;
border-radius: 50%;
background-color: #000;
}
.item:nth-child(2) {
align-self: center;
}
.item:nth-child(3) {
align-self: flex-end;
}

浙公网安备 33010602011771号