Ben's Sandbox
  • Projects
  • Tags

CSS3 Rotational Transforms and DOM Positioning using jQuery.css()


View Blog   View Source  
The actual position of a rotated element relative to another element depends on the point of origin used to rotate the element. Additionally, jQuery offset() uses getBoundingClientRect() as a starting point to calculate the top/left point of an element. For a rotated element, the top/left will not be on the object nor will it be a point used in the positioning of that object when setting CSS styles. Compare this to using offset() to position a rotated element.

© Ben Olson 2012 with help from Jekyll Bootstrap and Twitter Bootstrap