CSS3 several new units of length

Source: Internet
Author: User
Tags vmin

Reference article: Http://www.webhek.com/7-new-css-units

Tag Description:

The numbers are labeled as doubtful places.

Try to give an English translation behind a proprietary name, because the official documents are basically English and may be ambiguous after each reader's translation.

Overview:

EM: The font size relative to the text within the current object. The font size relative to the parent node

REM: The font size relative to the root element

The viewport height of vh and VV:1VH equals 1/100 ①,1vw is equal to 1/100 of the viewport width.

Vmin and Vmax: The minimum or maximum value of the viewport height and width, vmin equals 1/100 of the viewport width high school minimum value. Scenario: Make an element always visible on the screen.

Ch: Width of the number 0

Ex: the height of the lowercase x-Letter of the current font or the 1em② of 1/2. Application scenario: Superscript and subscript

Information extracted:

1, Font-size: If there is no declaration will inherit the parent node's properties

Extended:

①window, document,body width High:

The body height is the height of the BODY element (including the border scrollbar, etc.), with a margin of 8px around the default

If the HTML is not set to color, the body color, the body color fills the entire background

Viewport viewport refers to the viewable range of the browser, except the border, scroll bar, and the document display area of the toolbar.

How can ②0.5em be equal to 1ex?

The actual test found that the setting 0.5em and 1EX performance slightly different. After all, the lowercase x letter is half the font size font-size. Of course, you can't rule out a font that fits this condition.

Relative: Offsets in the proper position. The original location of the DOM remains

CSS3 several new units of length

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.