Powered by md-Blog  文 - 篇  访客 -

一个清除浮动的clearfix标准写法


更新:2020-02-19 19:58:34  /  创建:2020-02-19 19:58:34  /  分类:写一个Demo  / 
不要删除
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    .clearfix::after{
        content:'';
        display: block;
        clear:both;
    }
    .box_1{
        float: left;
        border: 1px solid #000;
        width:200px;
        height: 80px;
    }
    </style>
</head>
<body>
    <div class="clearfix">
        <div class="box_1">
         浮动模块
        </div>
    </div>
    <div>后面的模块</div>
</body>
</html>
不要删除

小站不易,感谢支持!