vm in css is the viewport unit, which is the smaller of the width or height relative to the viewport. Similar units are vw and vh, which represent the maximum width and maximum height of the viewport respectively.
vw: the maximum width of the viewport, 1vw=one percent of the viewport width;
(Learning video sharing: css video tutorial)
vh: the maximum height of the viewport, 1vh=one percent of the viewport height;
vmin/vm: relative to the width of the viewport or The smaller of the heights. The smallest one is divided into 100 units of vmin (i.e. vm).
px: The relative length unit of pixel, which is relative to the screen display resolution;
em: The value of em is not fixed and will be integrated with the parent element. Font size;
rem: relative unit, (root em is rem). When using rem as the unit to set the font size, it is relative to the size of the HTML root element. It can be modified and adjusted proportionally through the root element. All font sizes are generally written on the body or html when used. body{fontsize:625%;} is 1rem=100px.
Related tutorial recommendations: CSS tutorial
The above is the detailed content of What is the unit of vm in css?. For more information, please follow other related articles on the PHP Chinese website!