Html5 Video Background Example - Html

How to set video as background?

Snippet Code


  
Rate this page :
  [ 0 votes]

Html5 is a markup language which is used to structure or present content on the world wide web. Here,this code allows you to add video background to your webpage. The sample code to set video as background on your html page is given below.

<video id="videobcg" preload="auto" autoplay="true" loop="loop" muted="muted" volume="0"> <source src="mov_bbb.ogg" type="video/ogg"> <source src="mov_bbb.ogg" type="video/ogg"> Sorry, your browser does not support HTML5 video. </video> <center><h2>Welcome to Hscripts!!!</h2></center> <style> #videobcg { position: absolute; top: 0px; left: 0px; min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: -1000; overflow: hidden; } </style>

Tags


Ask Questions

Ask Question