GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

01YouTube responsive embed — a video frame that recomputes its ratio from the available width

Whenever the card's width changes, the frame's height is recomputed from that width, so the video frame's aspect ratio stays exactly the same no matter how the screen size shifts.

Best forVideo-tutorial slots inside blog posts, intro-video sections on responsive landing pages

aspect-ratiogetBoundingClientRectrequestAnimationFrame
YouTube responsive embed — a video frame that recomputes its ratio from the available width
Open in a new tab

01 YouTube responsive embed — a video frame that recomputes its ratio from the available width — Measured area 26.864% · moving frames 23/23Original by GODRICH · SCSS and React ship in the zip · 9 YouTube Embed Code UI Patterns (Copy-Paste)

The post this demo lives in

9 YouTube Embed Code UI Patterns (Copy-Paste) - preview of all 9 demos9 YouTube Embed Code UI Patterns (Copy-Paste)Nine embed UIs: a frame's height recomputes from its width, a lite facade times itself into a full frame after a delay, See all demos in this post

If you like this effect - similar demos