Shrink or expand


Apply simplified matrix algebra to scale an element to be smaller or larger.

Property values

This is an alias for the transform property. It may be specified in any of these forms:

syntax form equivalent
scale: s transform: scaleX(s) scaleY(s);
scale: sx sy transform: scaleX(sx) scaleY(sy);
scale: sx sy sz transform: scale3d(sx, sy, sz);

Variable units

Each of the values for (sx, sy, sz) are unitless numbers. Values less than one shrink the element. Values larger than one enlarge the element.


/* shrink to be 1/2 size */            
scale: 0.5;

/* enlarge to be twice the size */
scale: 2;

style > transform > scaleShrink or expand