MDN self-hosted library · e01.org

Understanding and setting aspect ratios

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

css
aspect-ratio: 3 / 6;
aspect-ratio: 1 / 2;
aspect-ratio: 0.5 / 1;
aspect-ratio: 0.5;
css
aspect-ratio: 9/6;
aspect-ratio: 3/2;
aspect-ratio: 1.5;