HTML and CSS Reference
In-Depth Information
Transitions add effects during the transition from one style to another. Transforms, on the other hand,
change the appearance of an element using effects such as rotating, skewing, and scaling. Consider the
following CSS rule:
.rotate {
border: 2px solid #071394;
This rule uses the transform property prefixed with vendor prefixes to rotate the element by 10
degrees. The rotate function accepts an angle by which the element is to be rotated. A positive number
indicates rotation in the clockwise direction, and a negative number indicates rotation in the
counterclockwise direction. Figure 13-20 shows the resulting <div> .
Figure 13-20. Rotating an element using the transform property
As you can see, the <div> element and the FormView inside it are rotated 10 degrees clockwise.
You can also add a skewing effect and change the scaling using the skew() and scale() functions,
respectively. You can also use multiple functions together, as the following CSS rule shows:
.skew {
Search WWH ::

Custom Search