<html>

<head>
    <style>
        html,
        body,
        ul {
            margin: 0;
            padding: 0;
        }

        ul {
            width: 100%;
            height: 40rem;
            background: #000;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
        }

        li {
            width: 30%;
            height: 6rem;
            display: inline-block;
            background: #ededee;
            margin-top: 1rem;
            text-align: center;
        }

        ul:after {
            content: "";
            width: 30%;
            height: 0px;
            visibility: hidden;
        }
    </style>
</head>

<body>
    <ul>
        <li>1</li>
        <li>1</li>
        <li>1</li>
        <li>1</li>
        <li>1</li>
        <li>1</li>
        <li>1</li>
        <li>1</li>
        <li>1</li>
        <li>1</li>
        <li>1</li>
    </ul>
</body>

</html>

 

*重点在给外层的盒子加after

相关文章:

  • 2021-11-17
  • 2021-12-16
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-06
  • 2021-07-20
相关资源
相似解决方案