<video>
tag including onmouseover="this.play()"
and onmouseout="this.pause()"
to trigger playback on hover.object-fit: cover
.To disable autoplay and instead trigger background video playback on hover in Webflow, you'll need to bypass the default Background Video component and use a standard Video element instead, since Webflow’s native Background Video element does not support hover play control.
<video>
tag with the following attributes:onmouseover="this.play()"
– plays video on hover.onmouseout="this.pause()"
– pauses when not hovered.muted
, loop
, playsinline
– to meet browser autoplay policies and ensure smooth behavior.autoplay
– this disables automatic playback.Example inline code inside the Embed element:
<video src="your-video-file.mp4" muted loop playsinline onmouseover="this.play()" onmouseout="this.pause()" style="width:100%; height:auto;"></video>
Replace "your-video-file.mp4"
with your video’s hosted URL. Webflow does not allow direct hosting of video files outside the Background Video block, so you'll need to host the video externally (e.g., AWS S3, Dropbox, or your own CDN).
position: relative
.position: absolute
, top: 0
, left: 0
, width: 100%
, height: 100%
, and object-fit: cover
.This mimics a background image behavior while using a playable video.
Webflow's native Background Video element forces autoplay and offers no hover controls. To enable hover-based video playback, use a custom Embed element with a standard <video>
tag and onmouseover/onmouseout
handlers. This gives you full control over playback based on user interaction.