开发者

CSS3 2D Transforms not working on IE9 if set by jQuery

As per title, I'm translating and rotating an object with CSS3's transform and it works flawlessly in every browser except IE9.

It works in IE9 but only if it's written directly into the .css file. It fails if set by jQuery (v. 1.5.1) with:

开发者_如何学C
$('#example').css('-ms-transform', 'translate(200%) rotate(45deg) translate(-200%)');

Any suggestion?


I don't know what is causing the problem. However, have you tried with cssText:

$('#example').css('cssText','-ms-transform: translate(200%) rotate(45deg) translate(-200%)');

Sometimes this would seem to work.

EDIT: I believe the problem is related to this jQuery issue:

http://bugs.jquery.com/ticket/8346

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜