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