Skip to content

Video backgrounds

TIL: you can add a background gradient to the HTML video element. This is great if you don’t have a cover image (see an example), and you could even use a media query to change your gradient to match your site theme in dark mode. (video is criminally underused: it’s easy to make responsive and offers all sorts of controls via its attributes. YouTube’s fault, I guess.)

Previous note

Next note

@leonp at fosstdon.org @leonp at mastodon.social email