reading-notes

Transforms

The value specifies the transform type followed by a specific amount inside parentheses.

.

Transitions & Animations

There are four transition related properties in total, including transition-property, transition-duration, transition-timing-function, and transition-delay.

Example

 .box {
background: #2db34a;
-webkit-transition-property: background;
   -moz-transition-property: background;
     -o-transition-property: background;
        transition-property: background;
-webkit-transition-duration: 1s;
   -moz-transition-duration: 1s;
     -o-transition-duration: 1s;
        transition-duration: 1s;
-webkit-transition-timing-function: linear;
   -moz-transition-timing-function: linear;
     -o-transition-timing-function: linear;
        transition-timing-function: linear;
 }
.box:hover {
 background: #ff7b29;
}

Transition duration

The value of this property can be set using general timing values, including seconds (s) and milliseconds (ms). These timing values may also come in fractional measurements, .2s for example.

Animations

The @keyframes rule includes the animation name, any animation breakpoints, and the properties intended to be animated. .

8 simple imazing transitions

  1. Fade in

  2. Change color

  3. Grow & Shrink

  4. Rotate elements

  5. Square to circle

  6. 3D shadow

  7. Swing

  8. Inset border