use transform for css code example
Example 1: rotate element css
div {
width: 80px;
height: 80px;
background-color: skyblue;
}
.rotated {
transform: rotate(45deg); /* Equal to rotateZ(45deg) */
background-color: pink;
}
Example 2: transform:translateX()
/* <length-percentage> values */
transform: translateX(200px);
transform: translateX(50%);