Figure 6.11. A box (left) is scaled by a factor of 2 (right)
Eachscalefunctionacceptsamultiplierorfactorasitsargument.Thismultiplier
canbejustaboutanypositiveornegativenumber.Percentagevalues,however,
aren’tsupported.Positivemultipliersgreaterthan 1 willincreasethesizeofan
element.Forexample,scale(1.5)willincreasethesizeoftheelementintheX
andYdirections1.5times.Positivemultipliersbetween 0 and 1 willreducethe
sizeofanelement.
Valueslessthan 0 stillcauseanelementtoscaleupordowninsize;however,using
anegativescalingvaluecausesareflection(flip)transform.InFigure6.12,theright
figurehasbeenscaledinbothdimensionsbyafactorof-2(scale(-2)),flippingit
horizontallyandvertically.
CSS Transforms 237