Notes

CSS Transitions and Transforms

Edit on GitHub

CSS & Sass

Transforms

transform lets you modify the visual appearance (coordinate space) of css elements. Elements can be translated, rotated, scaled, and skewed

Examples

Scale (resizes elements)

Scale the .box by increasing it 20 times it’s original size. Value is in percentage

1.box {
2  width: 20px;
3  height: 20px;
4  transform: scale(20);
5}

Translate (moves elements)

Skew

Rotate

center an element

1/* center the element */
2top: 50%;
3left: 50%;
4transform: translate(-50%, -50%);