Phonegap:After build transform and perspective CSS properties are not working?

匿名 (未验证) 提交于 2019-12-03 07:36:14

问题:

I am making an app using JQuery mobile.

For swipe events i included one library.By using that i am able to use swipeleft,swiperight,swipeup and swipedown events.

I have tested my app in android 4.0,4.1,4.2 and chrome browser of android 4.4.It works .

CSS

#joy_div {       perspective: 500px;     }     button {       margin: 10px 0 0 0;     }     .left, .right, .down, .up, .reset {       transition: transform 0.5s ease;       transform-origin: 50% 50%;     }     .left {       transform: rotateY(-40deg);     }     .right {       transform: rotateY(40deg);     }     .up {       transform: rotateX(-40deg);     }     .down {       transform: rotateX(40deg);     }     .reset {       transform: rotateX(0) rotateY(0);     } 

JQuery

    $("#joy_div").swipe ({     swipeStatus:function(event, phase, direction, distance, duration, fingers)     {     if (phase!="cancel" && phase!="end") {//start,move       if( direction == 'left') {         $(this).children('#joystick').removeAttr('class')         .addClass('left1');         moveClawLeft = 1;     } else if (direction == 'right'){                                                                              $(this).children('#joystick').removeAttr('class').addClass('right1');     moveClawRight = 1;     } else if (direction == 'up'){       $(this).children('#joystick').removeAttr('class')        .addClass('up');        moveClawUp = 1;     } else if (direction == 'down'){        $(this).children('#joystick').removeAttr('class')        .addClass('down');         moveClawDown = 1;        }      }     },     threshold:10,     maxTimeThreshold:5000,     fingers:'all'     }); 

Problem:

Now after building app ,It works fine in android versions less that 4.4 and in 4.4 these events are called but transform and perspective css properties are not working.

This might be error in cordova wrapping.

Please help me to resolve that error.

Thanks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!