How do you make the background image clearer when you are building a mobile web page?

Source: Internet
Author: User
I found a problem. if I want a region, for example, if the width and height are PX, and the background image is exactly PX, the display on the mobile phone will be blurred, while Android and Apple will be blurred, only when my background image exceeds 200px, for example, 300px, and then the background-size: contain method is used... I found a problem. if I want a region, for example, if the width and height are PX, and the background image is exactly PX, the display on the mobile phone will be blurred, while Android and Apple will be blurred, the background image is clear only when my background image is over 200px, for example, 300px and then uses the background-size: contain method. why?

Reply content:

I found a problem. if I want a region, for example, if the width and height are PX, and the background image is exactly PX, the display on the mobile phone will be blurred, while Android and Apple will be blurred, the background image is clear only when my background image is over 200px, for example, 300px and then uses the background-size: contain method. why?

We recommend that you read this article:
Http://www.w3cplus.com/css/towards-retina-web.html
Simply put, a screen pixel will display 4 css pixels, such as the iPhone 5S, device-pixel-ratio is 2, the screen width is 320px, but the display page is 640px, therefore, to display a px wide image, the image must be made 640px wide to be clear.

It may be because the mobile phone is a high-definition screen, and the actual pixel is 2X

Go online and check the webpage's adaptation to the retina screen

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.