aspect-ratio
aspect-ratio is a CSS property in the Layout category. Sets the preferred aspect ratio of an element. The syntax is aspect-ratio: <ratio>. A typical example: aspect-ratio: 16 / 9; It is commonly applied to markup such as <div class="demo">Sample</div> Browser support: Chrome 1+, Firefox 1+, Safari 1+, Edge 12+. A close relative is display, which sets the display behavior of an element. A close relative is visibility, which controls whether an element is visible. A close relative is overflow, which controls how overflowing content is displayed. More about this category: CSS layout properties for positioning and arranging elements on a web page. Related Layout entries: display, visibility, overflow, overflow-x, overflow-y, contain, resize, object-fit. This page is part of the free CSS Reference documentation covering 841+ properties, selectors, functions, and at-rules, each with syntax, values, examples, and browser support.