Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

transform origin css

/* transform origin default value is center */
img{
transition:transform 1s;
transform-origin:top; /*rotate from top  center*/
transform-origin:right; /*rotate from right middle */
transform-origin:top-right; /*rotate from top right */
transform-origin:30% 80%; /* rotate from 30% x and 80% bottom*/
transform-origin:300px 150px; /*rotate from 300px from x and 150px bottom */
}
img:hover{
 transform:rotate(45deg) /* rotate 45 deg clockwise */
}
 
PREVIOUS NEXT
Tagged: #transform #origin #css
ADD COMMENT
Topic
Name
6+7 =