Create a media queries template code fragment using EM

Source: Internet
Author: User
Tags min

Article Introduction: Create a CSS3 media Queries using the EM unit.

This site has a lot of relevant tutorials about CSS3 media queries, to say the least, is to use media queries to make Responsiv desgin. Now a popular foreign design is called responsive Design (domestic called response-style), where the key to this layout is that the media queries can not be matched, as early as in the "CSS3 media queries template " A text to introduce the commonly used templates, but there are many comments and forums that use PX for the unit write response layout, will cause breakpoints, then today to everyone to use the "em" unit media queries template code fragment:

/* ===== = = = = = 20em (320px) = = = = = =====/@media only screen and  (min-width:20em) {  }/   * ===== = = = = = 30em (480px) = = = = = = =====/@media only screen and  (min-width:30em) {}/* ===== = = = =   37.5em (600p x = = = = = = = = = = = = = = = = = = = = = = = = = = = =====/@media only screen and  (min-width:37.5em) {  } * ===== = = =   48em = =  /@media only screen and (Min-width:48em) {}/* ===== = = = = = =  56.25em (900px) = = = = = = =   ===== */
   @media only screen and (min-width:56.25em) {}/* ===== = = = = = 68.75em (1100px) = = = = = =   =====/  @me Dia only screens and (min-width:68.75em) {  } * ===== = = = =   81.25em (1300px) = = = = = = =====/  @media o nly screen and (min-width:81.25em) {  


Related Article

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.