魔法CSS(1)——消失的list-style

来源:https://segmentfault.com/a/1190000016969667?utm_medium=hao.caibaojian.com&utm_source=hao.caibaojian.com&share_user=1030000000178452

<ul>
  <li>
    <p>啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊
      <span class="check"/>
    </p>
     </li>
  <li>
    <p>预约管理/会员管理/数据分析/店铺 <span></span></p>
  </li>
  <li>管理基本店务管理功E <span class="check"/></li>
  <li>基础版门店管现权唱。 <span class="check"/></li>
  <li>始终跟随列表高度垂直居 <span class="check"/></li>
</ul>

  <style>
    body{
      font-size:3vw;
      margin:0;
      padding:0;
    }

    ul{
      margin:0;
      padding: 0;
    }
    li {

      text-align: left;
      list-style-position: inside;
      white-space: nowrap
    }

    span {
      position: relative;
      display: inline-block;
      width: 16px;
      height: 15px;
      margin: 0 10px;
    }

    span::after {
      content: "";
      position: absolute;
      left: 0;
      width: 100%;
      height: 50%;
      border: 2px solid #000;
      border-radius: 1px;
      border-top: none;
      border-right: none;
      background: transparent;
      transform: rotate(-45deg);
    }
    p{
      display: inline-flex;
      justify-content: space-between;
      align-items: center;
      white-space: normal;
      width:96%;
    }

  </style>

猜你喜欢

转载自blog.csdn.net/zgrbsbf/article/details/84028866