Start Here
Core Concepts
UI Effects
Animations
Box Shadows
Text Shadow
UI Widgets
Color Shade
Gradient
Text Gradient
Background Gradient
Border Gradient
Other Pages
Nav First Level
Nav Second Level
Nav Third Level
N
A
V
A
V
Aspect Ratio
Definition and Usage
The aspect-ratio property defines the proportional relationship between an element's width and height. When both aspect-ratio and width are specified, the height is automatically calculated based on the defined ratio.
Aspect-Ratio Examples
Property | Value |
---|---|
AtRo1 | aspect-ratio: 1; |
AtRo1-1 | aspect-ratio: 1 / 1; |
Note
Both aspect-ratio: 1; and aspect-ratio: 1/1; are functionally the same.
Aspect-ratio: 1; is a shorthand, where a single value means 1/1 by default. Aspect-ratio: 1/1; explicitly defines the width-to-height ratio as 1:1.
In both cases, the element maintains a perfect square shape.
Web Tool
Celebrate Tech © 2008 - 2024
Welcome Amit
Logout
Change Password
Change Email