Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

rotate in 3d css

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 */
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #rotate #css
ADD COMMENT
Topic
Name
4+9 =