在项目列表中经常会用到圆点,圆点可以用图片展示,但图片必然占据项目容量,在小程序中项目大小尤为重要,较大的时候还要用到分包处理。

怎么用伪类写圆点呢?人狠话不都直接上图、上代码

用伪类写圆点css

 

 

.unread{
        position: relative;
        padding-left: 24upx;
        &:after {
            content: ' ';
            position: absolute;
            left: 0upx;
            top: 16upx;
            width: 12upx;
            height: 12upx;
            background-color: red;
            border-radius: 6upx;
        }
    }

 

相关文章:

  • 2022-12-23
  • 2021-07-29
  • 2022-01-02
  • 2022-12-23
  • 2021-08-03
  • 2021-06-30
  • 2022-12-23
  • 2021-12-12
猜你喜欢
  • 2022-12-23
  • 2021-05-11
  • 2021-06-06
  • 2021-12-12
相关资源
相似解决方案