Black Lives Matter! ✊🏾


This property sets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions. 4.1. Intrinsic Aspect Ratios: the aspect-ratio property

Links about aspect-ratio

  1. A First Look at `aspect-ratio` | CSS-Tricks

    posted on

    Oh hey! A brand new property that affects how a box is sized! That’s a big deal. There are lots of ways already to make an aspect-ratio sized box (and I’d

  2. Designing An Aspect Ratio Unit For CSS — Smashing Magazine

    posted on by Rachel Andrew

    What problems will the new aspect ratio unit solve? A look at the design of a new CSS feature.

  3. Can I use... Support tables for HTML5, CSS3, etc

    posted on by Can I use

Code sample

.box {
width: 400px;
height: auto;
aspect-ratio: 1/1;