About Font-size

Source: Internet
Author: User

See an article thinking good, record it down. Original Address https://css-tricks.com/rems-ems/

REM (root em), also a relative length unit, differs from EM by the font-size of the root element, thus avoiding the trouble caused by the EM cascade effect. So many people started using REM layouts.

{ font-size:}{ font-size:}{ font-size:}  { font-size:}

Ideally, you can resize the page by simply adjusting the font-size value in the HTML. In fact, the effect is not ideal, some parts will be too large, and some of the handwriting will be small to illegible.

This led to the idea thatpx at the Root, REM for components, and EM for actual elements.

Change to html{font-size:100%} would be a little better

About Font-size

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.