Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

-webkit-transform does not work in Android webview

i have applied the following css to an image in span tag.

-moz-transform: rotate(-2deg);
-webkit-transform: rotate(-2deg);
transform:rotate(-2deg);
-o-transform: rotate(-2deg);

this css style works on ios webview, desktop browser, but not on android webview, which is also webkit based.

my question is why this is not rendered on Android.

like image 447
user1118019 Avatar asked May 09 '12 03:05

user1118019


People also ask

Why is my WebView not working?

You might often face issues in updating the chrome and Android System Webview. To fix this problem, you can reboot your device, check your internet connection, stop auto-updating all apps, clear Google Playstore cache, and storage, leave the beta testing program, and manually update Android WebView app from Playstore.

Is there an alternative to Android System WebView?

Flyperlink is a great alternative app to System WebView.


2 Answers

AFAIK, the rotation transform is only applied to block level elements. A span is an inlined element by default.

like image 102
Andrew Avatar answered Dec 09 '22 16:12

Andrew


i am using android version 3.1 and this code working fine for me.. my code is below

.transofmr
{
-ms-transform: rotate(30deg); /* IE 9 */
-webkit-transform: rotate(30deg); /* Safari and Chrome */
-o-transform: rotate(30deg); /* Opera */
-moz-transform: rotate(30deg); /* Firefox */
transform: rotate(30deg);

width:200px;
height:200px;
background-color:#339933;
}
<div class="transofmr">Transform</div>
like image 25
cgvector Avatar answered Dec 09 '22 14:12

cgvector