Transformations, Transitions, and Animations Flashcards
How to rotate a box when we hover?
.box{
transform: rotate(15deg)
}
How to make a box larger?
.box{
transform: sclae(1.5);
}
How to make a box skew?
.box{
transform: skew(1.5);
}
How to move a box?
transform: translate(horizontal_axis, vertical_axis)
How to achieve 3-D transformation?
We have to use perspective
.box:hover{
transform: perspective(200px) translateZ()
}
What are different transformation functions available?
translate
rotate
scale
skew
What is transition?
Transition: property_name time ease-in|linear delay_time
transition: transform .5s;
transition: transform .5s ease-out;
transition: transform .5s ease-out 1s; /* 1s delay */
transition: transform .5s, color .3s;
How to apply Animation?
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.5); } 75% { transform: rotate(45deg); background: tomato; } 100% { transform: rotate(0); } }
.box {
animation: pop 3s ease-out;
}
Easy way of applying animation?
aimation.style