how to rotate a picture in css code example
Example 1: rotate image html
.img {
transform: rotate(90deg);
}
Example 2: rotate image css
div {
width: 80px;
height: 80px;
background-color: skyblue;
}
.rotated {
transform: rotate(45deg); /* Equal to rotateZ(45deg) */
background-color: pink;
}
Example 3: image orientation css
#image {
image-orientation: 90deg; /* Can be changed in the live sample */
}