Transform property: CSS Tricks for a Dynamic Website
Transform attributes
Transform Attribute
Description
translate
allows for moving the element within 2D and 3D spaces
scale
changes the size of the element with a choice of maintaining or not the aspect ratio
rotate
let’s you turn your element around
skew
tilts and deforms your element
perspective
an attribute exclusively used for 3D transforms. It defines the size of the abstract z-axis allowing you to operate in the third dimension
matrix
is a pre-made combination of previous attributes and is used alternatively as one attribute to cover all other attributes
Note:
Transform examples
1. Moving Tile on hover
Go to widget styles.
Hover custom animation
Now select the hover state. From now we’ll be editing the behavior of the element as the user activates it by hovering their mouse cursor over it.
Go back to transform and apply subtle changes to translate and scale. We’ll give translate -20px on Y axis and 104% for scale.
2. Popping text
We’ll add a text inside and style it in the way we want. For this example we are using the “Parisienne” font.