Home > Web Front-end > CSS Tutorial > What length units are there in css?

What length units are there in css?

php中世界最好的语言
Release: 2018-03-09 10:33:39
Original
2269 people have browsed it

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

and paragraph< p> Write a Sanmao quotation

##How to use the tag to write personal favorites in HTML


# #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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template