<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Wsscat DEMO</title>
    </head>

    <body>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
    </body>
    <style>
        body {
            margin: 0;
            padding: 0;
        }

        .box {
            float: left;
            width: 30%;
            margin-top: 10px;
            margin-left: 2.5%;
            height: 0;
            padding-bottom: 33.98%;//或者padding-top
            background-color: #dbe0e4;
            background-image: url(1.jpg);//图片不要用css3图片响应式布局标签,用这两个属性配合会更好控制图片缩放
            background-size: cover;
        }
    </style>
</html>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
  • 2021-11-08
  • 2022-01-05
  • 2022-12-23
  • 2021-10-20
猜你喜欢
  • 2021-11-07
  • 2021-11-07
  • 2021-09-30
  • 2022-12-23
  • 2021-11-07
  • 2022-03-04
相关资源
相似解决方案