Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS3 linear-gradient not working on android.

Tags:

android

css

Newbie question here but for some reason I cant figure this out. I have the following CSS which works fine on my iPhone but not an my Android. From looking at the jQuery Mobile demos with the android I know it can handle background gradients. Thanks

.mydiv {
  background:    -moz-linear-gradient(#FFFFFF, #F1F1F1) repeat scroll 0 0 #EEEEEE;
  background: -webkit-linear-gradient(#FFFFFF, #F1F1F1) repeat scroll 0 0 #EEEEEE;
  background: linear-gradient(#FFFFFF, #F1F1F1) repeat scroll 0 0 #EEEEEE;
}
like image 366
Evanss Avatar asked May 10 '12 15:05

Evanss


1 Answers

Android browser below 4.0, according to caniuse uses the old -webkit syntax:

background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a7cfdf), color-stop(100%, #23538a));

Bonus: I recommend you use something like LESS or Compass/SASS, it would save you all this work http://compass-style.org/

like image 78
Cmorales Avatar answered Oct 04 '22 20:10

Cmorales