EM vs REM

Source: Internet
Author: User

EM is relative to the parent element of the Font-size,rem is relative to the root element of the font-size.

The supplement of REM:

① for browsers that do not support it, the workaround is simple enough to write an absolute unit statement. These browsers ignore the font size set by REM;

②ie9/ie10 does not support REM when used for pseudo-elements or when using a font shorthand declaration;

③ios safari5.0-5.1, although REM is supported, does not support REM when using media queries.

EM vs REM

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.