Home  »  CodeGuidesProgrammingSnippetsTechnology   »   CSS Rotate Element 90 Degrees Example Code

CSS Rotate Element 90 Degrees Example Code

Posted: September 13, 2022 | by Michael Bright

CSS rotate element 90 degrees example code snippet.

transform: rotate(90deg);

.my-div{
  transform: rotate(90deg); /* rotate x-axis and y-axis */
  transform: rotateX(90deg); /* rotate x-axis */
  transform: rotateY(90deg); /* rotate y-axis */
}

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.