<main>
<video src="https://assets.codepen.io/3/mov_bbb.mp4" muted autoplay loop playsinline controls></video>
</main>
video {
width: 100%;
aspect-ratio: 16 / 9;
}
main {
max-inline-size: 70ch;
margin-inline: auto;
min-block-size: 100dvh;
background: white;
padding: 1rem;
}
body {
background: #eee;
margin: 0;
}
* {
box-sizing: border-box;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.