Fullscreen Background Video Using HTML5 And CSS

You know very well play background video is a modern way to show your website in front of your users and clients when user visit and view your website a video is playing in the background of your website without disturbing its content and that makes your website very beautiful, attractive and different. So, in this tutorial we will show you how to add fullscreen background video using HTML5 and CSS.

HTMl code for play background video

<div class="video-container">
	<video autoplay loop muted id="video-bg">
		<source src="http://www.employastar.com/wp-content/themes/employastar/media/Meeting-Room.mp4" type="video/mp4" />
	</video>
</div>

CSS code for play background video

<style>
#myVideo{
	position: relative;
	right: 0; bottom: 0;
	min-width: 100%;
	min-height: 100%;
	z-index:9;
	overflow-x:hidden;
}
#video-bg{
	position: relative;
	width: auto;
	min-width: 100%;
	height: auto;
	background: transparent url(video-bg.jpg) no-repeat;
	background-size: cover;
}
video{display: block;}
.video-container{
	width: 100%;
	overflow: hidden;
	position: fixed;
	top: 0; right: 0;
	z-index: -100;
}
</style>

Article Name: Fullscreen Background Video Using HTML5 And CSS
Publish Date: 08-08-2018
Google Tags: video background css tricks, css video background div, background video html css, responsive video background, bootstrap background video, html5 video background examplesm, youtube video background html5, css background video cover

Leave a Reply

Related Posts: You may like

How to remove whitespace from string using php

Remove All Special Characters From String PHP

Redirecting HTTP to HTTPS with PHP

Convert Base64 string to an image file

Tools:

Crypto Currency

PHPKIDA provides free online the best real-time crypto market price, news, predictions, index with graphs & historical data for 2000+ coins including bitcoin, ethereum, & altcoins from major cryptocurrency exchanges.

Visite Tool

Icon Generator

PHPKIDA provides free online icon generator. Our icon generator help you to edit, modify, resize and customize icon for your website and applications. Convert to a shap you like add icon border, you can change icon border color, border size, background color, icon shadow, icons color, icon size in your own way and save it as a png image.

Visite Tool

Youtube Video Downloader

PHPKIDA provides Free online YouTube video downloader to download YouTube videos quickly in MP4, 3GP, and more. Search your video and free fast download youtube videos.

Visite Tool

Sign up for weekly update

Milkshake is almost ready. If you're interested in testing it out, then sign up below to get exclusive access.