Skip to content

题目 83


css
.box {
    /* 请在此处编写代码 */
}

.box1 {
    width: 100px;
    height: 150px;
    background-color: #5cd8a2;
}

.box2 {
    width: 100px;
    height: 50px;
    background-color: #ff8077;
}

.box3 {
    width: 100px;
    height: 50px;
    background-color: #ffcb3d;
}
.box {
    /* 请在此处编写代码 */
}

.box1 {
    width: 100px;
    height: 150px;
    background-color: #5cd8a2;
}

.box2 {
    width: 100px;
    height: 50px;
    background-color: #ff8077;
}

.box3 {
    width: 100px;
    height: 50px;
    background-color: #ffcb3d;
}
html
<body>
    <div class="box">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
    </div>
</body>
<body>
    <div class="box">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
    </div>
</body>

题目:请利用 flex 实现垂直居中效果。

答题文件: 83.html

更新时间: