The method of converting px to rem by vscode
This article mainly introduces the method of converting px to rem by vscode. It is very detailed and has certain reference value. Friends who are interested must finish it!
The px to rem plug-in is selected here. Use the steps:
1. First, install the px to rem plug-in
2. Then, find "px to rem" in "Settings"-> "user Settings"-> "extension".
As shown in the figure:
3. Or configure it directly in setting.json
"px-to-rem.px-per-rem": 75, "px-to-rem.number-of-decimals-digits": 4
4. Finally, edit width:200px in the style file and press the shortcut key ALt+Z to change to width:2.6667rem
Note:
The base value set here is 75 because the default width of the design draft is 750px.
These are all the contents of this article entitled "vscode's method of converting px to rem". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!