<video playsinline autoplay muted loop>
<source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
<source src="https://www.w3schools.com/html/mov_bbb.ogg" type="video">
Your browser does not support the video tag. I suggest you upgrade your browser.
</video>
<header>
<nav>
<a href="#">Shop</a>
<a href="#">Stores</a>
<a href="#">Products</a>
</nav>
</header>
<div class="overlay">
<h2>Meet the crazy-smart women we asked.</h2>
</div>
@import url(https://fonts.googleapis.com/css?family=Lato:400,300,300italic,400italic,700,700italic,900);
* {
box-sizing: border-box;
}
body {
font-family: "Lato","Avenir Next",Arial,sans-serif;
margin: 0;
background: #000;
background-size: cover;
}
video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
-o-object-position: center;
object-position: center;
}
.overlay {
min-height: 100vh;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.overlay h2 {
background: #000 none repeat scroll 0 0;
color: tan;
font-weight: 600;
margin: 2rem 3rem 0;
mix-blend-mode: overlay;
padding: 5px 15px;
text-align: center;
}
header {
background:tan;
position: fixed;
width: 100%;
text-align: center;
color: white;
-webkit-transition: .4s;
transition: .4s;
padding: 0.5em;
}
nav a {
color: inherit;
padding: 0 12px;
text-decoration: none;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.