Blackbelt
Blackbelt

Reputation: 157457

Webview and Css3

Does Android 2.2 supports all the Css3 tags? On ICS:

background: -webkit-linear-gradient(left, #64615E, #B6B0AB, #64615E);
background: -moz-linear-gradient(left, #64615E, #B6B0AB, #64615E);
background: -o-linear-gradient(left, #64615E, #B6B0AB, #64615E);

those are rendered correctly. On Android 2.2 and android 3 they are not. Am I doing something wrong or those tags are not supported?

Upvotes: 2

Views: 1121

Answers (1)

polaretto
polaretto

Reputation: 799

on Android 2.2-2.3 you have to use the old gradient syntax, which is:

background: -webkit-gradient(linear, center left, center right, color-stop(0%, #64615E), color-stop(50%, #B6B0AB), color-stop(100%, #64615E));

You can add the rule before -webkit-linear-gradient, so it will work in older and newer versions as well. Moreover, I think Android browser/webview will ignore the other vendor specific prefixes like -moz or -o.

Upvotes: 1

Related Questions