CSS aspect-ratio

Previous Next

Demo of the different values of the aspect-ratio property.

Click the property values below to see the result:

aspect-ratio: 1/1;
aspect-ratio: 1/2;
aspect-ratio: 5/2;
aspect-ratio: 16/9;
aspect-ratio: 1;
aspect-ratio: 0.5;
aspect-ratio: 2;
DIV1
DIV2
DIV1
DIV2
DIV1
DIV2
DIV1
DIV2
DIV1
DIV2
DIV1
DIV2
DIV1
DIV2

Play more with the code in our Tryit yourself editor: Try it Yourself ❯