1div {
2 width: 80px;
3 height: 80px;
4 background-color: skyblue;
5}
6
7.rotated {
8 transform: rotate(45deg); /* Equal to rotateZ(45deg) */
9 background-color: pink;
10}
11
1/* Single <length-percentage> values */
2transform: translate(200px);
3transform: translate(50%);
4
5/* Double <length-percentage> values */
6transform: translate(100px, 200px);
7transform: translate(100px, 50%);
8transform: translate(30%, 200px);
9transform: translate(30%, 50%);
10transform: translate(90%, 90%);
11
12
1div {
2 width: 60px;
3 height: 60px;
4 background-color: skyblue;
5}
6
7.moved {
8 transform: translate(50px, 10px);
9 background-color: pink;
10}
11