Browser size screen adaptation method, browser size adaptation

Source: Internet
Author: User

Browser size screen adaptation method, browser size adaptation

To create a download page for our client products. The designer gave the screen and small screen cut, so the question is, how to display different pictures according to the screen size? I have never done this before. A colleague suggested using js to get the browser size and dynamically Replace the image. The method is feasible, but it is very troublesome. The product manager needs to achieve the same effect as the QQ download page. Why don't you study the QQ download page?

Open the QQ download page on your laptop and desktop, review the elements, use the big picture on the big screen, and use the small picture on the small screen. They reference different css files. The css file header referenced by the small screen has the following code:

@ Media screen and (max-height: 800px)

Baidu's function of this Code is multimedia query. You can set different styles for different screen sizes. This is a shortcut to solve the problem of screen 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.