vue climb pit road ---- mobile terminal adapter unit rem

Basically used to write code in a mobile terminal large vue frame;

But there is a problem, the mobile terminal adapter required, we often need to use the unit rem; on rem, a relative units;

Well, you can do this:

(First, I used here is vscode editor)

step1: vscode plug px2rem + installation, and set the reference value, here is my 75;

 

 step2: npm install lib-flexible;

step3: The introduction of global flexible installation, i.e. in main.js the import;

main.js

 

After completion of the above steps, you can perfectly convert the units. Here applause

 

Guess you like

Origin www.cnblogs.com/liuguoying/p/10960044.html