利用伪元素画三角

<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>利用伪元素画三角</title>

  <style>

    .info-tab {

      position: relative;

    }

    .info-tab::after {

      content: "";

      border: 10px solid transparent;

      border-top-color: black;

      position: absolute;

      top: 0;

    }

  </style>

</head>

<body>

  <div>

    <span class="info-tab"></span>

  </div>

  

</body>

</html>

猜你喜欢

转载自blog.csdn.net/u012687612/article/details/110867855