Reference: https://www.zhangxinxu.com/wordpress/2011/03/css-css3-unit-units/
1. The length of the unit
unit | meaning |
---|---|
in | Relative to the font size of the parent element |
rem | Relative to the root element's font size |
vw | Relative to the width of the window: Window width 100vw |
Articles | Relative to the height of the window: window height is 100vh |
vm | With respect to the width or height of the window, whichever is smaller |
px | Relative to the screen resolution rather than the window size: usually a point or 1/72 of an inch |
% | Relative to the parent element. Under normal circumstances is itself defined by other elements or attributes |
2. The frequency-time angle
unit | meaning |
---|---|
you | degrees, angle |
city | grads, grads |
work | radians, radians |
turn | turns, number of turns |
ms | milliseconds, milliseconds |
s | seconds, the number of seconds |
Hz | Hertz, Hertz |
kHz | kilohertz, kHz |