Terms of the offer
Definition and Usage The aspect-ratio property allows you to define the ratio between width and height of an element. If aspect-ratio and width properties are set, the height will follow in the defined aspect ratio . To better understand the aspect-ratio property, view a demo. Tip: Use the aspect-ratio property in responsive layouts where elements often vary in size and you want to preserve the ratio between width and height. Show demo The aspect ratio of an image is the ratio of its width to its height . It is expressed as two numbers separated by a colon, in the format width:height. Common aspect ratios are 1.85:1 and 2.39:1 in cinematography, 4:3 and 16:9 in television, and 3:2 in still photography. Introduction to Aspect Ratios Aspect ratio is the proportional relationship between an image's width and height, typically expressed as two numbers separated by a colon (e.g., 16:9) or as a decimal (e.g., 1.78:1). Understanding aspect ratios is crucial for creating, editing, and displaying visual content across different media and platforms. The aspect- ratio feature is specified as a < ratio > value representing the width-to-height aspect ratio of the viewport. It is a range feature, meaning you can also use the prefixed min-aspect- ratio and max-aspect- ratio variants to query minimum and maximum values, respectively.