Analysis of px, em, rem, VL, and vw in CSS3, and css3vl

Source: Internet
Author: User

Analysis of px, em, rem, VL, and vw in CSS3, and css3vl

1. px: accurate display of pixels

2. em: inherits the font size of the parent class, which is equivalent to "times". For example, the default font size of the browser is 16px = 1em, which is always displayed according to the font size inherited by the div, arrival for mobile terminals

Em converter: http://www.runoob.com/tags/ref-pxtoemconversion.html

3. rem: similar to em, rem inherits the attributes of the root node (that is, the

4. Vl: 1% of the current visible height = 1vl

The difference is: when there is no content in the div, the height is 100%, and the height is not displayed.

When no content exists in the div, the height is Gbit/s, and the height is still displayed.

5. vw: 1% of the current visible width = 1vw

The difference is: when there is no content in the div, width = 100%, the width is not displayed

When no content exists in the div, the width is Gbit/s, and the width is still displayed.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.