Javascript webkit css转换不工作
我的css转换动画有问题。我正试图通过jquery设置转换的动画。除了webkit浏览器,一切都正常。我不想用类来设置转换的动画,我需要用jQuery来实现。 以下是简化代码:Javascript webkit css转换不工作,javascript,jquery,Javascript,Jquery,我的css转换动画有问题。我正试图通过jquery设置转换的动画。除了webkit浏览器,一切都正常。我不想用类来设置转换的动画,我需要用jQuery来实现。 以下是简化代码: $(this).delay(i * 60).queue(function(next) { $(this).css({ '-moz-transition': 'transform 1s', '-o-transition'
$(this).delay(i * 60).queue(function(next)
{
$(this).css({
'-moz-transition': 'transform 1s',
'-o-transition': 'transform 1s',
'-webkit-transition': 'transform 1s',
'transition': 'margin-top 1s,transform 1s,opacity 1s',
'-moz-transform': 'rotateZ(100deg) rotateX(100deg)',
'-o-transform': 'rotateZ(100deg) rotateX(100deg)',
'-webkit-transform': 'rotateZ(100deg) rotateX(100deg)',
'transform': 'rotateZ(100deg) rotateX(100deg)'
});
next();
});
这条线
'-webkit-transition': 'transform 1s',
'transition': 'margin-top 1s,transform 1s,opacity 1s',
应该是
'-webkit-transition': '-webkit-transform 1s',
在这一行
'transition': 'margin-top 1s,transform 1s,opacity 1s',
页边空白和不透明度都是无用的(显示代码)嗯,你是在用css做这件事。很抱歉,我把我的代码和step函数搞混了。我编辑了文本以符合代码并使事情更清楚;)谢谢,但这似乎不起作用,我现在得到了旋转,但1秒的过渡不起作用。它只是在没有动画的情况下更改css