Css Rotate

Source URL: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate

Language: css

Created on: 2020-05-29 14:50:31

div {
  width: 80px;
  height: 80px;
  background-color: skyblue;
.rotated {
  transform: rotate(45deg);
  background-color: pink;

/* In body of html doc */
<div class="rotated">Rotated</div>
The rotate() CSS function defines a transformation that rotates an element around a fixed point on the 2D plane, without deforming it. Its result is a data type.