rpx px and conversion

() Gets the value by API wx.getSystemInfoSync

**// 在 iPhone6 下运行:

var systemInfo = wx.getSystemInfoSync();
console.log(systemInfo.windowWidth); // 输出 375(单位 px)
 
// 在 iPhone6 Plus 下:
var systemInfo = wx.getSystemInfoSync();
console.log(systemInfo.windowWidth); // 输出 414 (单位 px)**

And conversion between RPX formula px: px = rpx / 750 * wx.getSystemInfoSync () windowWidth;.

Guess you like

Origin blog.csdn.net/smlljet/article/details/90787152