Create an HTML5/Youtube Video as Background on a Webpage

Video Background Plugin is a small jQuery plugin to simplify the process of displaying HTML5 video as background. You can use this to display a video file or a Youtube video on the background of the entire page or to show the video as the background of elements like <div>, <section>.

html5 video generate poster image, html5 video image while loading, html5 video thumbnail image, html5 video loading spinner, html5 video cover, html5 video poster not showing


  • Cross browser video Background¬†plugin.
  • Support mp4 and WebM video files.
  • YouTube video support.
  • Very small file size (4KB total).
  • Easy to use.
  • They can be used for a page background or for an element’s background.
  • Backup image when the video is not supported.
  • Pause the video when it is out of view.
  • Multiple instances on the same page are possible.
  • The device is easy to respond to and quick to respond.
  • Tested on all modern browsers.

How to make use of it:

1. Include the vidbacking JavaScript and CSS files on the web page where the jQuery library loads properly.

<link rel="stylesheet" href="jquery.vidbacking.css" type="text/css">
<script src="//"></script>
<script src="dist/jquery.vidbacking.js"></script>

2. Embed an HTML5 video or a Youtube video on the webpage.

<video poster="poster.jpg" autoplay muted loop class="vidbacking">
  <source src="sample.mp4" type="video/mp4">
<iframe width="560" height="315" src="Add Video Link Here" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen  class="vidbacking"></iframe><br type="_moz">

3. Make the video in full-screen mode and serve as background for the whole page.


4. You can also apply the video background to the container element you select.


5. If you want to display an overlay mask in the background of the video.

  'masked': true

6. Change the opacity of the mask and video.

  'video-opacity': '1',
  'mask-opacity': '1'

jQuery Plugin For HTML5 Video Background With Fallback Image, Video Background Plugin with Support for Youtube Video Github, video fallback image

See Demo And Download

Official Website(souravm84): Click Here

This superior jQuery/javascript plugin is developed by souravm84. For extra advanced usage, please go to the official website.

Related Posts


Responsive Drag and Drop File Uploader/Download Plugin | 5x5_jq_uploader

5x5_jq_uploader plugin can be used to instantly create a drop file area and file queue with a little bit of preparation. Bootstrap is used for responsive planning…


Stylesheet For Implementing Dark Mode with Bootstrap

Bootstrap Dark Mode provides a style sheet and two texts that allow you to implement Dark Mode on your website. Initially loaded based on user preferences, can…


Multi-purpose Navigation Menu for Javascript Library | jQuery Corenav

coreNavigation is a multipurpose navigation menu for a jquery based javascript library, comes with more style, and is easy to integrate. 11 Default Menu 2 Responsive Navigation…


Simple Multi-Select Dropdown Pure Vanilla Javascript | multiSelect.js

MultiSelect.js is a simple, clean, and progressive JavaScript library designed for easy integration with any type of project or system. The design was heavily influenced by the…


Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…


How To Create A Popup in HTML with CSS

How to create popup in html with css – Popup without JavaScript is an elegant pop-up panel component with an animated scale, written in CSS. Have you…