Convert px to upx

Upx is the default unit of measurement in uni-app. upx is a viewport unit that supports responsive screen by ratio setting. In uni-app, default viewport width is 750upx.

uni-app can solve the unit problem evenif the viewport does not match 750upx.

  • HBuilderX 【Settings】【Editor】

Convert px to upx - 图1

  • Tick on px to upx ratio, see the following image

Convert px to upx - 图2

About upx,learn more:upx

HBuilderX also supports conversion from px to rem in Web application development.