We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
日常开发中,开发者经常会遇到需要绘制 1px 边框的诉求,由于 Rax App 提供了 rpx 能力,同时为了避免 1px 边框过粗,一般来说符合直觉的写法是:
.box { border: 1rpx solid #ddd; }
但由于移动端不同机型的绘制逻辑不一样,会在某些机型上出现 1rpx 边框消失的问题,所以如下给出移动端通过伪元素绘制 1px 边框最佳实践:
.box { position: relative; &:after { content: " "; position: absolute; top: 0; left: 0; width: 200%; height: 200%; transform: scale(0.5); transform-origin: left top; box-sizing: border-box; border: 1px solid #ddd; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
日常开发中,开发者经常会遇到需要绘制 1px 边框的诉求,由于 Rax App 提供了 rpx 能力,同时为了避免 1px 边框过粗,一般来说符合直觉的写法是:
但由于移动端不同机型的绘制逻辑不一样,会在某些机型上出现 1rpx 边框消失的问题,所以如下给出移动端通过伪元素绘制 1px 边框最佳实践:
The text was updated successfully, but these errors were encountered: