Accurate application of media query on the Response webpage

Source: Internet
Author: User

Xuefeng3600media query is used accurately on the Response webpage. We all know the importance of media query in html5 for the response webpage. It provides us with an effective method to detect screen devices, when developing a page, we can easily check the screen size based on the media query and load the corresponding css style. However, from our common desktop and tablet computers to smartphones, the screen size is so large that many web Front-end developers have a headache. Recently I found a very practical website responsivewebcss, which provides developers with a dedicated screen size detection tool. after entering the website, they only need to select the corresponding screen size, this tool will automatically generate corresponding media queries for you. The following is the summary of the media query code, which involves the screen size of mainstream devices. I hope it will help you. When we use it, we can directly put the dependent css style into the media query. /* The screen size of a flat device (such as ipad) is between PX and PX, and the screen size of the device is horizontal */@ media only screen and (min-width: 481px) and (max-width: 1024px) and (orientation: landscape) {}/* the screen size of an ipad or large-sized smartphone device (768px) is between 321px and 1024px, and the device is in portrait status */@ media only screen and (min-width: 321px) and (max-width: 1024px) and (orientation: portrait) {}/* Phone landscape screen status (480px) */@ media only screen and (min-width: 321px) and (max-width: 480px) and (orientation: landscape) {}/* Phone portrait screen status (320px) */@ media only screen and (max-width: 320px ){}

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.