html - Video as background with overlayed elements -
goal: add video background using html , css only.
the idea here have video running in loop doesn't allow interaction user background.
in front of video want elements. text...
the issue code: seems working intended 1 thing: video in front of else. how put behind other elements?
html:
<div id="home" class="home3"> <video style="width: 100%" src="video/bg_video.mov" autoplay="true" loop="true" muted="true"> <div class="home-text-wrapper"> <div class="sixteen columns"> <div class="home-logo-text"> <a href="#about">hevar</a> </div> </div> <a href="#about"> <div class="container clearfix"> <div class="home-quote"> <h1> <span class="slabtext">some text</span> <span class="slabtext">some text</span> <span class="slabtext second-child"> text</span> <span class="slabtext">some text</span> </h1> </div> </div> </a> </div> </video> </div> css:
#home { position: relative; overflow: hidden; height: 100%; width: 100%; display: table; color: #010101; z-index:10; .home3 .home-text-wrapper .container { width: 350px; height: 350px; border-radius: 50%; background: rgba(0, 0, 0, 0.61); text-align: center; -webkit-transition: 0.4s ease-in-out; -moz-transition: 0.3s ease; -o-transition: 0.3s ease; transition: 0.3s ease; box-shadow: 0px 0px 0px 10px rgba(255, 255, 255, 0.24); overflow: hidden; } .home3 .home-text-wrapper .container.no-safari { -webkit-backface-visibility: hidden; backface-visibility: hidden; } .home3 .home-quote { -webkit-transition: 0.3s ease-in-out; -moz-transition: 0.3s ease-in-out; -o-transition: 0.3s ease-in-out; -ms-transition: 0.3s ease-in-out; transition: 0.3s ease-in-out; display: table-cell; vertical-align: middle; height: inherit; text-align: center; width: inherit; overflow: hidden; color: white; } .home3 .slabtextdone { color: #ffffff; } .home3 .slabtextdone .slabtext.second-child { display: inline-block; width: auto; color: steelblue; text-shadow: none; overflow: hidden; } .home3 .home-text-wrapper .container:hover { -webkit-transform: scale(1.09); -moz-transform: scale(1.09); -o-transform: scale(1.09); -ms-transform: scale(1.09); transform: scale(1.09); box-shadow: 0px 0px 0px 15px rgba(255, 255, 255, 0.24); -webkit-transform-style: preserve-3d; overflow: hidden; } .home3#home h1 { font-size: 30px; overflow: hidden; margin: 0 50px; }
video{ position: fixed; min-width: 100%; min-height: 100%; z-index: -100; left: 0; bottom: 0; } and fix html:
<video></video> rest code <div></div>
Comments
Post a Comment