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
时间:2017-01-12 11:18:21
rpx , rem , px
1px = 2rpx 1rem = ( 750/20 ) rpx
rpx单位是微信小程序中CSS的尺寸单位,rpx可以根据屏幕宽度进行自适应。 规定的屏幕宽度为 750rpx (其他就说 iphone6 的物理像素) iphone6 屏幕宽度 375px , 750物理像素=750rpx
因此 1px = 2rpx
微信小程序规定屏幕的宽度为 20rem, 那么就换算成 rpx 和 px 的公式就出来了
1rem = 750/20 = 37.5rpx 1rem = ( 750/20/2 ) px
The text was updated successfully, but these errors were encountered:
No branches or pull requests
零、总结
一、支持的单位
rpx , rem , px
二、单位介绍
1. rpx
rpx单位是微信小程序中CSS的尺寸单位,rpx可以根据屏幕宽度进行自适应。 规定的屏幕宽度为 750rpx (其他就说 iphone6 的物理像素)
iphone6 屏幕宽度 375px , 750物理像素=750rpx
因此 1px = 2rpx
2. rem
微信小程序规定屏幕的宽度为 20rem, 那么就换算成 rpx 和 px 的公式就出来了
The text was updated successfully, but these errors were encountered: