惜风不起、唯有努力!
css布局之边距

css布局之边距

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>xuexi</title>
    <style>
        .fl{
            float: left;
        }
        .wk{
            width: 200px;
            height: 200px;
            background-color: #4e3fe6;
            /*左边距*/
            margin-left: 10px;
        }
    </style>
</head>
<body>
    <h3>html xx</h3>

    <div class="fl wk">xxxxxxxxxxxxx</div>
    <div class="fl wk">ssssssssss</div>
    <div class="fl wk">xxxxxxxxxxxxx</div>
    <div class="fl wk">ssssssssss</div>
    <div class="fl wk">xxxxxxxxxxxxx</div>
    <div class="fl wk">ssssssssss</div>

</body>
</html>

效果如下图

发表回复

您的电子邮箱地址不会被公开。