280 of 313 menu

The transform property

The transform property specifies element transformations, such as rotation, scaling, skew, translation and others. The corresponding transformations are written separated by a space:

selector { transform: rotate(30deg) scale(3); }

Example

In this example, the block is rotated 30 degrees clockwise:

<div id="elem">lorem ipsum</div> #elem { transform: rotate(30deg); border: 1px solid black; width: 100px; height: 50px; }

:

Example

In this example, in addition to the rotation, a skew has also been added:

<div id="elem">lorem ipsum</div> #elem { transform: rotate(30deg) skew(20deg); border: 1px solid black; width: 100px; height: 50px; }

:

Example

In this example, in addition to rotation and skew, scaling has been added:

<div id="elem">lorem ipsum</div> #elem { transform: rotate(30deg) skew(20deg) scale(2, 3); border: 1px solid black; width: 100px; height: 50px; }

:

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline