WeCodeAcademy
❮ object-fitcontent ❯

aspect-ratio

Keeps a box at a ratio of width to height.

Group: Layout

Syntax

aspect-ratio: w / h;

Example

Examplehtml
Open in editor »

← All of CSS Properties