美文网首页
display:box;

display:box;

作者: beforerFE | 来源:发表于2016-12-06 15:15 被阅读25次

display:box;
-webkit-box-pack: center;
-webkit-box-align: center;

-webkit-box-pack: justify;做均匀分布布局。


配图
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .box{
    height: 40px;
    display: -webkit-box;
    -webkit-box-pack: justify;
}
.cell{
    width: 20px;
    height: 20px;
    background-color: red;
}
    </style>
</head>
<body>
    <div class="box">
        <div class="cell"></div>
        <div class="cell"></div>
        <div class="cell"></div>
        <div class="cell"></div>
        <div class="cell"></div>
        <div class="cell"></div>
    </div>
</body>
</html>

CSS3盒模型display:box详解:http://www.warting.com/web/201402/68557.html

相关文章

网友评论

      本文标题:display:box;

      本文链接:https://www.haomeiwen.com/subject/evdrmttx.html