Rachelle
Rachelle

Reputation: 16

Rotating CSS 3 Shapes

Are there any ways to rotate CSS 3 shapes at a certain angle?

Dabblet code here.

Upvotes: 1

Views: 339

Answers (3)

yashodhan
yashodhan

Reputation: 36

Add transform:rotate to your id octagon.

Refer this link: http://davidwalsh.name/css-transform-rotate

Upvotes: 2

ihayes83
ihayes83

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

sanjeev
sanjeev

Reputation: 4621

.shape
    {
        transform:rotate(150deg);
        -ms-transform:rotate(150deg); /* IE 9 */
        -webkit-transform:rotate(150deg); /* Opera, Chrome, and Safari */
    } 

Upvotes: 2

Related Questions