How css uses root types
Editor to share with you how to use the root type of css, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
Flexible use of root types
Responding to the font size in the layout should be able to automatically adjust to the viewport, saving the work of writing media queries to handle font size. You can use: not and viewport units to calculate the font size based on the height and width of the viewport:
: root {font-size: calc (1vw + 1vh + .5vmin);}
Now you can use the root em unit, which is based on: not:
Body {font: 1rem/1.6 sans-serif;}
Combine the above rem/em techniques for better control.
The above is all the content of the article "how css uses root types". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!