Magical pseudo-element

A: check mark

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>对勾</title>
  <style>
    *, :after, :before {
      box-sizing: border-box;
      -webkit-box-sizing: border-box;
    }
    a {
      text-decoration: none;
    }
    .message {
      text-align: center;
    }
    .success {
      font-size: 16px;
      font-weight: 600;
      color: #42c02e;
    }
    .success:before {
      content: '';
      display: inline-block;
      width: 18px;
      height: 10px;
      border-width: 0 0 4px 4px;
      border-style: solid;
      transform: rotate(-45deg);
      -webkit-transform: rotate(-45deg);
      position: relative;
      bottom: 4px;
      right: 8px;
    }
  </style>
</head>
<body>
  <div class="message">
    <a href="#" class="success">发布成功,点击查看文章</a>
  </div>
</body>
</html>

Guess you like

Origin www.cnblogs.com/sunshine21/p/10988450.html