Using this tool you can easily convert css unit, with some simple steps.
A CSS unit determines the size of a property you're setting for an element or its content. CSS has several different units for expressing a length. Many CSS properties take "length" values, such as width, margin, padding, font-size, etc.
Length is a number followed by a length unit, such as 10px, 2em, etc.
There are two types of length units: absolute and relative.
The absolute length units are fixed and a length expressed in any of these will appear as exactly that size.
| Units | Discription |
|---|---|
| cm | centimeters |
| mm | millimeters |
| px | pixels (1px = 1/96th of 1in) |
Relative length units specify a length relative to another length property. Relative length units scale better between different rendering medium.
| Units | Discription |
|---|---|
| rem | Relative to font-size of the root element |
| vw | Relative to 1% of the width of the viewport |
| vh | Relative to 1% of the height of the viewport |