当前位置:网站首页>微信小程序中rpx
微信小程序中rpx
2022-08-07 03:08:00 【51CTO】
rpx是为了解决微信小程序屏幕宽度自适应问题产生的尺寸单位,是微信小程序独有的尺寸单位,
rpx(responsive pixel): 可以根据屏幕宽度进行自适应。规定屏幕宽为750rpx。如在 iPhone6 上,屏幕宽度为375px,共有750个物理像素,则750rpx = 375px = 750物理像素,1rpx = 0.5px = 1物理像素。
引用官网的换算
| 设备 | rpx换算px (屏幕宽度/750) | px换算rpx (750/屏幕宽度) |
|---|---|---|
| iPhone5 | 1rpx = 0.42px | 1px = 2.34rpx |
| iPhone6 | 1rpx = 0.5px | 1px = 2rpx |
| iPhone6 Plus | 1rpx = 0.552px | 1px = 1.81rpx |
边栏推荐
猜你喜欢

利用PHP的特性做免杀Webshell

Wechat applet's homestay room reservation uniapp applet

投稿经验分享之三:SCI投稿之JEI录用

STM32——RTC实时时钟原理+BKP寄存器原理

卫星星座1:Starlink星座

大型网站高并发解决方案——集群

什么是(UL)SIS线?

Lynk & Co 09phev is fully equipped with active and passive safety features, and it can accelerate from 100 km to 5.6s

云虚拟机top命令的%st解读

超级水王问题
随机推荐
STM32——RTC实时时钟原理+BKP寄存器原理
ansible HostName module
使用软引用实现缓存机制
1002:求三个数最大值 C语言七种写法
利用PHP的特性做免杀Webshell
..\USER\stm32f4xx.h(102): error: #35: #error directive: “Please select first the target STM32F4xx d
Chat room code backup
Coco data set analysis and reading method
jsp use
OAuth2的定义和运行流程
【FLink】Assigned key must not be null
分享一些 VsCode 各场景相关的高级调试与使用技巧
Wonderful Review|Cloud Native Meetup Guangzhou Station
84-MongoDB高级介绍
STM32 - RTC real-time clock principle + BKP register principle
1008: 级数求和
When will LayoutSubviews be called
The difference between target and currentTarget in WeChat applet
微信小程序中target和currentTarget的区别
Large website high concurrency solution - cluster