Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The method of converting px to rem by vscode

Shulou Source: shulou.com Published: 2022-06-02 18:04:17 11月14日 Update

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!

Tags: Methods content plug-ins articles values interests benchmarks benchmarks widths guys buddies shortcuts documents more styles steps users knowledge industry information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Technology vpn macOS OPPO Reno