Is it possible to set the rotation point in CSS? The default rotation point is at the 50%, 50%. I tried:
transform: rotate(230deg); rotation-point:90% 90%;
But it does not work... Any suggestions?
The CSS rotate() function lets you rotate an element on a 2D axis. The rotate() function accepts one argument: the angle at which you want to rotate your web element. You can rotate an element clockwise or counter-clockwise.
You could use transform-origin. It defines the point to rotate around from the upper left corner of the element. This would rotate around the upper left corner.
The transform property applies a 2D or 3D transformation to an element. This property allows you to rotate, scale, move, skew, etc., elements.
This will set the rotation pivot point on top-left corner of your element and rotate it:
transform: rotate(-25deg); transform-origin: 0% 0%;
take a glance at .nav_item_txt
class:
http://jsfiddle.net/KHkX7/
Use the transform-origin CSS property:
.class { transform-origin: 0 0; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With