How to add a video background to a hero section in Wix

Updated

In Wix Editor, select your top strip and choose Change Background → Video. In Wix Studio, select the section and use Inspector → Media. In Wix Editor, strip videos don't play on mobile by default, so switch them on in the mobile editor.

A seamless 3D hero loop: the kind of video this guide is about

Option 1: a strip or section background

Wix has two editors with slightly different paths.

  1. 1Wix Editor: select the top strip, click Change Background, choose Video and upload or pick your file.
  2. 2Wix Studio: select the section, open Inspector → Media → + Add image or video, then set focal point, opacity, playback speed and Loop.
  3. 3Add an overlay colour or gradient if your heading needs more contrast.
  4. 4Wix Editor only: open the mobile editor and turn the strip video on, because it's off on mobile by default.
  5. 5Publish and check the live site on a phone.

Limits to know

  • In Wix Editor, strip background videos are set not to play on mobile until you turn them on.
  • Wix Studio offers playback speeds from 0.25x to 1.25x and a Loop toggle.

Option 2: a Custom Element (Premium)

Wix's Embed HTML element runs your code inside an iframe, so it can't sit behind other page content and isn't responsive. For a real background player, use a Custom Element, Wix's option for web components, which needs a Premium plan, a connected domain and no Wix ads.

  1. 1Host the player script and your video files at public HTTPS URLs.
  2. 2Add a Custom Element (Wix Editor: Add Elements → Embed Code → Custom Element; Wix Studio: Add Elements → Embed & Social → Custom Element).
  3. 3Point it to the script's Server URL (or a Velo file) and enter the element's tag name, then stretch it to fill the section.
  4. 4Publish to check it, since the element only renders in an iframe in the editor and preview.
Plain HTML (for Embed HTML, which runs in an iframe)
<section class="hero">
  <video class="hero__video" autoplay muted loop playsinline
         preload="metadata" poster="/hero-poster.webp" aria-hidden="true">
    <source src="/hero-loop.av1.webm" type='video/webm; codecs="av01.0.08M.10"'>
    <source src="/hero-loop.mp4" type="video/mp4">
  </video>
  <div class="hero__content">
    <h1>Your headline</h1>
  </div>
</section>

<style>
  .hero { position: relative; isolation: isolate; min-height: 90vh; overflow: hidden; }
  .hero__video { position: absolute; inset: 0; z-index: -1;
                 width: 100%; height: 100%; object-fit: cover; }
  @media (prefers-reduced-motion: reduce) {
    .hero__video { display: none; }
    .hero { background: url(/hero-poster.webp) center / cover; }
  }
</style>

Things that trip people up

  • If you used Embed HTML and the video sits on top of your text, that's the iframe: switch to the native background or a Custom Element.
  • Since December 2025, Wix's frontend security can block some site-wide custom code snippets, so test after publishing.

The one-line version

Edgeloop loops ship with a small player that does all of the above for you: the right format per browser, a poster while it loads, pausing off-screen, reduced-motion support and a transparent version for your own background.

<script src="https://edgeloop.studio/hero-loop.js" defer></script>
<hero-loop src="/loops/your-loop/" focus="right center"></hero-loop>

Collection 01 opens soon. Join the waitlist for 3 free loops.

Your first free loop arrives by email right away. No spam.

Questions

Why doesn't my Wix video background play on mobile?

In Wix Editor, strip background videos are off on mobile by default. Turn the video on in the mobile editor.

Can I add custom video code to Wix?

Embed HTML runs in an iframe, so it can't act as a true background. A Custom Element can, but it needs a Premium plan, a connected domain and no Wix ads.

Sources

Same guide for other builders