Code snippet to add YouTube video as a background for you HTML tag.
Here goes your HTML:
<div class="video-background"> <div class="video-foreground"> <iframe src="https://www.youtube.com/embed/W0LHTWG-UmQ?controls=0&showinfo=0&rel=0&autoplay=1&loop=1&playlist=W0LHTWG-UmQ" frameborder="0" allowfullscreen></iframe> </div> </div> <div id="vidtop-content"> <div class="vid-info"> <h1>YouTube background here!</h1> </div> </div>
Here is your CSS (most of that just for beauty):
* { box-sizing: border-box; } .video-background { background: #000; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: -99; } .video-foreground, .video-background iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; } #vidtop-content { top: 0; color: #fff; } .vid-info { position: absolute; top: 0; right: 0; width: 33%; background: rgba(0,0,0,0.3); color: #fff; padding: 1rem; font-family: Avenir, Helvetica, sans-serif; } .vid-info h1 { font-size: 2rem; font-weight: 700; margin-top: 0; line-height: 1.2; } .vid-info a { display: block; color: #fff; text-decoration: none; background: rgba(0,0,0,0.5); transition: .6s background; border-bottom: none; margin: 1rem auto; text-align: center; } @media (min-aspect-ratio: 16/9) { .video-foreground { height: 300%; top: -100%; } } @media (max-aspect-ratio: 16/9) { .video-foreground { width: 300%; left: -100%; } } @media all and (max-width: 600px) { .vid-info { width: 50%; padding: .5rem; } .vid-info h1 { margin-bottom: .2rem; } } @media all and (max-width: 500px) { .vid-info .acronym { display: none; } }
×
Comments
play online casino http://onlinecasinogamespcx.com/ slots games free online casino gambling slots games free
play online casino http://onlinecasinogamespcx.com/ slots games free online casino gambling slots games free
slots online free casino online casino games
slots online free casino online casino games
free casino slot games online casinos casino online slots
online slot games http://onlinecasinosw.com/ slots online play casino slots free
free casino http://onlinecasinopc.com/ - casino games casino online vegas casino slots
casino real money casino blackjack world class casino slots
casino real money casino blackjack world class casino slots
casino real money casino blackjack world class casino slots
gold fish casino slots real casino slots online slot games casino online slots
play slots online http://onlinecasinosw.com/ casino blackjack online casinos casino real money
play slots online http://onlinecasinosw.com/ casino blackjack online casinos casino real money
online casino slots online casino bonus slots free
online casino real money http://onlinecasinosw.com/ - real money casino no deposit casino vegas slots online play casino
online casino real money http://onlinecasinosw.com/ - real money casino no deposit casino vegas slots online play casino
online casino real money http://onlinecasinosw.com/ - real money casino no deposit casino vegas slots online play casino
cashman casino slots http://onlinecasinopc.com/ slots games free slots games free best online casinos
cashman casino slots http://onlinecasinopc.com/ slots games free slots games free best online casinos
http://playcasinosw.com/ free online slots http://playcasinosw.com/ - vegas casino slots free slots games
online slot games online casino games big fish casino play slots
slots online play casino world class casino slots slots online
slots online play casino world class casino slots slots online
slots online play casino world class casino slots slots online
slots online play casino world class casino slots slots online
slots online free slots casino games free slots games http://onlinecasinopc.com/ - online casino slots
slots online best online casinos online slot games free slots games
slots online best online casinos online slot games free slots games
http://onlinecasinopc.com/ free slots games online slot games big fish casino free casino games
http://onlinecasinopc.com/ free slots games online slot games big fish casino free casino games
vegas slots online [url=http://playcasinosw.com/ ]free slots [/url] casino play slot games
vegas slots online [url=http://playcasinosw.com/ ]free slots [/url] casino play slot games
http://onlinecasinopc.com/ free casino free casino slot games play online casino vegas slots online
http://onlinecasinopc.com/ free casino free casino slot games play online casino vegas slots online
free casino games slots for real money casino games
free casino games slots for real money casino games
casino bonus codes slots free free casino games online cashman casino slots http://onlinecasinopc.com/ - free casino games online
free casino games online play online casino free casino games
real casino slots http://onlinecasinopc.com/ - free slots online casino gambling play casino casino online
online casinos vegas slots online slots for real money
http://casinoplaysw.com/ cashman casino slots http://casinoplaysw.com/ - online slots slots games free
best online casino http://playcasinosw.com/ - casino slots world class casino slots play casino
http://casinoplaysw.com/ real casino slots casino bonus codes play slots online free casino games online
http://casinoplaysw.com/ real casino slots casino bonus codes play slots online free casino games online
http://casinoplaysw.com/ real casino slots casino bonus codes play slots online free casino games online
http://casinoplaysw.com/ real casino slots casino bonus codes play slots online free casino games online
online casino slots http://playcasinosw.com/ slots games free slots games casino online
free casino games http://casinoplaysw.com/ - casino slots play slots online slots games
free casino games http://casinoplaysw.com/ - casino slots play slots online slots games
http://playcasinosw.com/ online casino real money casino bonus codes online casino games free casino games online