我有一个 Phonegap 应用程序,我必须以“计数器”增量旋转 IMG 箭头。该代码在模拟器 4.2 和更高版本的phonegap 1.0.0 上运行良好。现在我有phonegap 1.4.1 和模拟器5.0 和5.1。为什么没有发生轮换。
document.getElementById("userguideArrow").style.webkitTransform='旋转('+counter+'deg)';
有什么建议吗?
最佳答案
奇怪的问题:S...我使用以下方法使它工作:
var str = new String('rotate(' + counter + 'deg)');
document.getElementById("userguideArrow").style['-webkit-transform'] = str;
它对我使用 iPhone 5 模拟器很有用。
希望这也对您有用。让我知道你的结果伙伴。
关于javascript - webkitTransform 不适用于 ios Phonegap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12560234/