Friday, 1 August 2014

Full page video background with HTML5 and CSS in MVC5

View

<video id="video" preload="auto" autoplay="true" loop="loop" muted="muted" volume="0">
     <source src="movie.mp4" type="video/mp4">
    Sorry, your browser does not support HTML5 video.
</video>
 
 
CSS
 
#video {
     position: absolute;
     top: 0px;
     left: 0px;
     min-width: 100%;
     min-height: 100%;
     width: auto;
     height: auto;
     z-index: -1000;
     overflow: hidden;
}
 
Thats it ;) 

0 comments:

Post a Comment