Site menu

CodeCook.io

  • Languages
    • C
    • C++
    • CSS
    • Git
    • HTML
    • Java
    • JavaScript
    • jQuery
    • PHP
    • Python
    • Ruby
    • Scala
  • angle
  • degree
  • rotate
  • rotation
  • transform

CSS - Transform rotate

Rotates the element clockwise around its origin (as specified by the transform-origin property) by the specified angle. The operation corresponds to the matrix [cos(angle) sin(angle) -sin(angle) cos(angle) 0 0]. MDN: Transform rotate

rotation angle in degrees
0
487
  • Share on Facebook
  • Share on Google+
  • Share on Twitter

Implementation with vendor prefixes borrowed from CSS3 Please!

.box_rotate {
  -webkit-transform: rotate({{angle}}deg);  /* Chrome, Opera 15+, Safari 3.1+ */
      -ms-transform: rotate({{angle}}deg);  /* IE 9 */
          transform: rotate({{angle}}deg);  /* Firefox 16+, IE 10+, Opera */
}
css

Notes

last update: Nov. 11, 2014

Advertisement

This project is hosted on DigitalOcean, try it and support us

Related concept

  • Transform scale

Random task

  • Resolve merge conflict with local file
  • Run docker daemon container
  • Loop while condition is true
  • Strip whitespace around string
  • Sort objects by function
  • Blog
  • About
  • License