Open this example in the interactive library
Source code
<style>
.demo {
width: min(100%, 15rem);
aspect-ratio: 16 / 9;
}
</style>
<div class="demo">Widescreen aspect ratio</div>
Widescreen aspect ratio with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo {
width: min(100%, 15rem);
aspect-ratio: 16 / 9;
}
</style>
<div class="demo">Widescreen aspect ratio</div>