简体   繁体   English

webkitTransform在ios Phonegap上不起作用

[英]webkitTransform is not working on ios Phonegap

I have a Phonegap application where I have to rotate my IMG arrow with "counter" increment. 我有一个Phonegap应用程序,我必须以“计数器”增量旋转IMG箭头。 This code was working fine on semulator 4.2 and later with phonegap 1.0.0. 这段代码在semulator 4.2以及以后的phonegap 1.0.0上运行良好。 Now I have phonegap 1.4.1 and simulator 5.0 and 5.1. 现在我有phonegap 1.4.1和模拟器5.0和5.1。 Why Rotation is not happening. 为什么没有旋转。

document.getElementById("userguideArrow").style.webkitTransform='rotate('+counter+'deg)'; document.getElementById(“ userguideArrow”)。style.webkitTransform ='rotate('+ counter +'deg)';

Any suggestion ? 有什么建议吗?

Strange issue :S... I made it work using the following: 奇怪的问题:S ...我使用以下方法使其起作用:

var str = new String('rotate(' + counter + 'deg)');
document.getElementById("userguideArrow").style['-webkit-transform'] = str;

It worked for me using iPhone 5 simulator. 它使用iPhone 5模拟器对我有用。

Hope this will work for you too. 希望这也对您有用。 Let me know about your result mate. 让我知道你的搭档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM