用css实现步骤条

920 阅读1分钟
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>步骤条</title>
  <style>
    .box {
      width: 140px;
      height: 30px;
      line-height: 30px;
      text-align: center;
      font-size: 12px;
      background-color: orange;
      margin: auto;
      position: relative;
    }
    .box::before {
      left: 0;
      border-left: 15px solid #fff;
    }
    .box::after {
      right: -15px;
      border-left: 15px solid orange;
    }
    .box::before,  .box::after {
      content: '';
      position: absolute;
      width: 0;
      height: 0;
      border-top: 15px solid transparent;
      border-bottom: 15px solid transparent;
    }
  </style>
</head>

<body>
  <div class="box">1. 填写基本信心</div>
</body>
<script>

</script>

</html>