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
free slots no deposit casino vegas casino slots vegas slots online
Guilzl vyzscx Cialis or viagra Usa viagra sales
Guilzl vyzscx Cialis or viagra Usa viagra sales
Guilzl vyzscx Cialis or viagra Usa viagra sales
cashman casino slots online casino slots free casino
casino games http://onlinecasinofbk.com/ slots free online casino bonus free slots games
casino games http://onlinecasinofbk.com/ slots free online casino bonus free slots games
slots free online casino slots casino game online casino bonus
best online casinos http://onlinecasinofbk.com/ slots for real money casino online online casino games
casino play play casino play slots
casino play play casino play slots
casino play play casino play slots
http://onlinecasinofbk.com/ online casino gambling cashman casino slots best online casino casino online
casino games cashman casino slots play slots play slots http://casinoslotsfest.com/ - best online casinos
free slots http://onlinecasinofbk.com/ - casino bonus codes slots free online slots
free slots http://onlinecasinofbk.com/ - casino bonus codes slots free online slots
online gambling free casino games real casino slots free slots games
best online casinos http://onlinecasinofbk.com/ - free online slots slots for real money vegas slots online
world class casino slots http://casinoslotsfest.com/ free casino games free casino games online real casino slots
casino play online gambling play online casino online casino
casino play online gambling play online casino online casino
slots online http://casinoslotsfest.com/ no deposit casino free casino games online big fish casino
Tkxzfa rakwes Brand viagra over the net Buy viagra without rx
online slot games casino online slots best online casinos real money casino
free slots http://onlinecasinofbk.com/ casino online slots no deposit casino online casino games
free slots http://onlinecasinofbk.com/ casino online slots no deposit casino online casino games
free slots http://onlinecasinofbk.com/ casino online slots no deposit casino online casino games
free slots http://onlinecasinofbk.com/ casino online slots no deposit casino online casino games
Djrymi wxbava viagra for sale online in canada Usa pharmacy viagra
slots games http://onlinecasinofbk.com/ - casino real money play casino free slots free slots games
slots games http://onlinecasinofbk.com/ - casino real money play casino free slots free slots games
http://onlinecasinofbk.com/ vegas casino slots http://onlinecasinofbk.com/ - free casino games slots for real money
Clvydm wqtqud sildenafil without a doctor's prescription Buy viagra internet
http://onlinecasinofbk.com/ casino online slots online casino games casino slots casino bonus codes
http://cbdoilusd.com/ cbd oil for dogs http://cbdoilusd.com/ - buy hemp oil pure cbd oil
http://cbdoilusd.com/ cbd oil benefits http://cbdoilusd.com/ - cbd drops cbd oil store
Zwvcsb goxcem Buy viagra without rx Drug viagra
hemp cbd oil http://cbdoilusd.com/ - cbd near me cbd oil store cbd near me
cbd vape cdb oils cbd pure best cbd oil http://cbdoilusd.com/ - cbd oil for sale
cbd vape cdb oils cbd pure best cbd oil http://cbdoilusd.com/ - cbd oil for sale
cbd vape cdb oils cbd pure best cbd oil http://cbdoilusd.com/ - cbd oil for sale
http://cbdoilusd.com/ cdb oils http://cbdoilusd.com/ - hemp oil for pain cbd medic
buy cbd http://cbdoilusd.com/ - cbd products buy hemp oil cbd oil online
buy hemp oil http://buycbdoil11.com/ cbd oil store best cbd oil best cbd oil
buy hemp oil http://buycbdoil11.com/ cbd oil store best cbd oil best cbd oil
buy hemp oil http://buycbdoil11.com/ cbd oil store best cbd oil best cbd oil
cbd store http://buycbdoil11.com/ - cdb oils hemp oil for pain cbd vape
cbd oil for pain http://buycbdoil11.com/ - cbd buy cbd oil online cbd near me cbd oil online
buy cbd oil http://buycbdoil11.com/ - cbd tinctures buy cbd cbd oil benefits hemp oil for pain
http://buycbdoil11.com/ buy hemp oil cbd medic cbd tinctures cbd gummies walmart