Reputation: 16
Are there any ways to rotate CSS 3 shapes at a certain angle?
Upvotes: 1
Views: 339
Reputation: 36
Add transform:rotate
to your id octagon.
Refer this link: http://davidwalsh.name/css-transform-rotate
Upvotes: 2
Reputation: 401
.object {
transform: rotate(45deg);
}
You can also set the transform-origin:
object {
transform: rotate(45deg);
transform-origin: left;
}
You can change the position to left, right, top or bottom depending on how you want the object to rotate.
Hope this helps!
Upvotes: 1
Reputation: 4621
.shape
{
transform:rotate(150deg);
-ms-transform:rotate(150deg); /* IE 9 */
-webkit-transform:rotate(150deg); /* Opera, Chrome, and Safari */
}
Upvotes: 2