问题
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:
$('#example').css('-ms-transform', 'translate(200%) rotate(45deg) translate(-200%)');
Any suggestion?
回答1:
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
来源:https://stackoverflow.com/questions/5430809/css3-2d-transforms-not-working-on-ie9-if-set-by-jquery