font size problem

In front-end development, you can use the new property "rem" in CSS3 to make the font smaller than the minimum px. rem is a relative unit, its value is calculated relative to the font size of the root element (html element). For example, if the font size of the root element is 16px, then 1rem is equal to 16px, 2rem is equal to 32px, and so on. So rem can be used to set the font size so that the font is smaller than the smallest px.

For example, if you want to set the font size to 12px, you can use the following CSS code:

body {

font-size: 16px;

}

h1 {

font-size: 0.75rem;

}

Guess you like

Origin blog.csdn.net/JohnJill/article/details/129220922