transform: rotate3d(1, 1, 1, 45deg);
body{
perspective:500px;/*every time we use transform in 3d we need persective
perspective is distance between viewer and scene.i.e 500px */
}
img:hover{
transform:rotateZ(120deg); /*rotateZ is same as rotateX which is rotate 120deg Clockwise */
transform:rotateX(60deg);/* rotateX rotate x axis which is horizontal.so rotate
horizontal axios */
transform:rotateX(90deg);/*rotate 90deg horizontal so we cannot see image as it has zero thickness */
transform:rotateY(60deg);/*rotate y axis which is vertical */
}