完成一个 3 点的骰子
父元素
display: flex;
justify-content: space-between
第二个子元素
align-self:center;
第三个子元素
align-self:flex-end;
<!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>flex 画骰子</title><style>.box {width: 200px;height: 200px;border: 1px solid #ccc;border-radius: 10px;padding: 20px;display: flex;justify-content: space-between;}.item {width: 40px;height: 40px;background-color: #666;display: block;border-radius: 50%;}.item:nth-child(2) {align-self: center;}.item:nth-child(3) {align-self: flex-end;}</style></head><body><div class="box"><span class="item"></span><span class="item"></span><span class="item"></span></div></body></html>
