Reputation: 13
$(window).scroll(function(){
var rotation = 'rotate('+$(document).scrollTop()+'deg)';
things.css({
'-webkit-transform' : rotation,
'-moz-transform' : rotation,
'-ms-transform' : rotation,
'-o-transform' : rotation,
'transform' : rotation
});
});
This code rotates the elements on a page well when I call it, except in IE where the elements rotate off-axis.
Upvotes: 0
Views: 63
Reputation: 13
The fix laid in a class I had in the element! It was a icon font element.
line-height: 1;
needed to be changed to
line-height: normal;
Upvotes: 0
Reputation: 3518
You can use the transform-origin value to position the center point of the rotation
transform-origin: 50% 50%;
Upvotes: 1