This time I will bring you what length units are in css and what are the length units in css. Precautions What are the following are practical cases, let’s take a look.
1. There are two types of length units: relative and absolute. Relative length units specify a unit relative to other length properties . Style sheets that use relative units are easier to scale according to different output environments
Relative units are:
em:'font-size'
ex: The 'x-height'
'em' units of the relevant font are equal to the calculated value of the 'font-size' attribute of the element to which the rule applies. An exception is when 'em' appears in the value of the 'font-size' attribute itself, in which case the font size of the parent element is referenced. It can be used in vertical or horizontal measurements
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
Use React to complete an image carousel component
##Use
# #HTML inline style improvement "San Mao's Classic Quotes"
The above is the detailed content of What length units are there in css?. For more information, please follow other related articles on the PHP Chinese website!