小程序css中设置1rpx失效

在使用taro框架时,出现了设置一条横线高度为1rpx,但是失效了,无法显示。

伪类before使用2rpx配合scaleY(0.5)缩放到1rpx可以实现同样效果

::before {
    
    
    position: absolute;
    top: 0;
    content: ' ';
    width: 100%;
    height: 2rpx;
    background-color: #dee0e3;
    transform: scaleY(0.5);
  }

猜你喜欢

转载自blog.csdn.net/qq_42535651/article/details/106332761