Background-size raised background picture does not display the issue

Source: Internet
Author: User

background-size This background property should all be used in mobile development, and there will be a very good feeling. Today, backstage suddenly came to me that all the background pictures on the page can not be displayed. Quickly pick up the phone, open the native browser opened a look, sure enough ... All background images are not displayed (PS: Why not found before). Because the page is cut with the Chorme plugin to see the effect). If there is a problem, we need to verify the solution immediately. After the wind has rained. Finally found the reason and solved.

CSS background notation that raises the issue:

1 0 0 ; 2 @include background-size (20px 20px)/* SASS * *

After compiling with compass:

1 background:url (image URL) 0 bottom/10px 45px repeat-x; 2 -moz-background-size:10px 45px; 3 -o-background-size:10px 45px; 4 -webkit-background-size:10px 45px

That's how tragedy happened, background. After this shorthand, Android native browser cannot parse:

1 0 bottom/10px 45px

I use the avoidance method, using the detailed attribute notation:

background-position:0 bottom;background-repeat:repeat-x;background-image:url (image URL); @include background-size ( 10px 45px);

After compiling with compass:

1 background-position:0 Bottom; 2 background-repeat:repeat-x; 3 background-image:url (image URL); 4 -moz-background-size:10px 45px; 5 -o-background-size:10px 45px; 6 -webkit-background-size:10px 45px; 7 background-size:10px 45px;

In fact, the question of CSS does not raise this problem, mainly because the compass compiled style after the throw. This problem of time consumption is mainly in the location of the problem, leaving this one, I hope no one will encounter similar problems ....

Background-size raised background picture does not display the issue

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.