user16902936
user16902936

Reputation:

Rotate an svg image to 90 deg

I have an svg image

enter image description here

i want to rotate it so that it looks like this:

enter image description here

tried adding css:

  svg {
     transform: rotate(60deg);
  }

but its not working.

Upvotes: 1

Views: 319

Answers (1)

Robby Cornelissen
Robby Cornelissen

Reputation: 97272

The image in your question is not rotated, it's flipped (mirrored) horizontally. You can achieve this by scaling by a factor of -1 on the X axis:

svg {
  transform: scaleX(-1)
}

Upvotes: 3

Related Questions