Reading Notes
Project Aristotle
transform
applied in two different forms 2D and 3D
transform: rotate(20deg)
Rotates an element 20 degrees clockwisetransform: scale(.75)
Scales an element to 75% of originaltransform: translate(-10px, 25%)
Shifts element 10px left and down 25%transform: skew(5deg, -20deg)
Distorts the element 5deg on the X axis and 20deg on the Ytransform-origin: 20px, 50px;
Moves the center of rotation of an element 20 px right and 50px down from top lefttransform: perspective
Used to produce a 3D perspective similar to a vanishing pointFor a transition to occur an element must hav a change in state, easiest way is with a pseudo-class
:hover
:focus
:active
:target
transition-property
transition-duration
transition-timing-function
transition-delay
@keyframes
rule that sets up an animation1; Fade in
.fade{opacity:0.5;}
.fade:hover{opacity:1;}
2; Change Color
.color:hover{background: #53a7ea;}
3; Grow and Shrink
.grow:hover{transform: scale(1.3);}
4; Rotate Element
.rotate:hover{transform:rotateZ(-30deg)}
5; Square to Circle
.circle:hover{border-radius:50%;}
6; 3D Shadow
.threed:hover{
box-shadow:
1px 1px #53a7ea,
2px 2px #53a7ea,
3px 3px #53a7ea,
transform: translateX(-3px)
}
7; Swing *shakes and element back and forth
8; Inset Border
.border:hover{box-shadow: inset 0 0 0 25px #53a7ea}
A few different button style ideas
Example @keyframe of a ball bouncing
Example of keyframes and transforms to use as an animation for a 404 error
Example of a bounce animation