Android设备中的图像缩放

时间:2012-07-06 13:26:54

标签: android html5 css3

我使用css3缩放图像时用户点击图像即可将此css分配给图像,它在浏览器上完美运行但是当我在android上运行它时,它不会缩放图像只有翻译方法正常工作< / p>

.scaleImage{
-moz-animation-name: AN-ani-17;
-webkit-animation-name: AN-ani-17;
-moz-animation-duration: 2s;
-webkit-animation-duration: 2s;
-moz-animation-delay: 0s;
-webkit-animation-delay: 0s;
-moz-animation-fill-mode: both;
-webkit-animation-fill-mode: both;
}
@-webkit-keyframes AN-ani-17 {
0% {
    -webkit-transform: translate3d(0px, 0px, 0px) scale3d(1, 1, 1);
   -webkit-animation-timing-function: ease;
}


50% {
    -webkit-transform: translate3d(0px, 380px, 0px) scale3d(1, 1.5, 1);
    -webkit-animation-timing-function: ease;
}

/*  75% {
    -webkit-transform: translate3d(0px, 270px, 0px) scale3d(1, 1.2, 1);
    -webkit-animation-timing-function: ease;
}*/

100% {
    -webkit-transform: translate3d(0px, 470px, 0px) scale3d(1, 1.6, 1);
    -webkit-animation-timing-function: ease;
}
}

@-moz-keyframes AN-ani-17 {
0% {
    -moz-transform: translate(0px, 0px) scale(1, 1);
    -moz-animation-timing-function: ease;
}


50% {
    -moz-transform:translate(0px, 380px, 0px) scale(1, 1.5, 1);
    -moz-animation-timing-function: ease;
}


100% {
    -moz-transform: translate(0px, 470px, 0px) scale(1, 1.6, 1);
    -moz-animation-timing-function: ease;
}

}

如何在Android设备上运行它

1 个答案:

答案 0 :(得分:0)

我假设您使用的是Android 2.2或更高版本?在Android上无效的CSS3缩放是known bug。如果你想看到它固定的话就明星吧。

相关:CSS3 animation flicker on Android 2.2 (webkit-transform:translate(..) scale(..) at the same time)