<div id="home-wrapper">
<header class="hero" id="header">
<div class="navbar" id="navbar">
<h1 class="logo">Logo</h1>
<nav class="nav-links">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Blogs</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</div>
<div id="showcase" class="showcase">
<div id="showcase-content">
<h1 class="hero-heading">Hero Heading</h1>
<p class="lead-text">Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempora, accusamus.</p>
<a href="#" class="btn btn-primary btn-block">Read More</a>
</div>
</div>
</header>
</div>
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
line-height: 1.4;
}
ul {
list-style: none;
}
a {
text-decoration: none;
color: #fff;
}
.btn {
margin: 1rem 0;
padding: 0.75rem 1rem;
font-size: 1.2rem;
border-radius: 5px;
}
.btn-primary {
background: #0391dd;
color: white;
}
.btn-primary:hover {
background: rgba(3, 7, 28);
}
.btn-block {
display: inline-block;
}
#navbar {
padding: 1rem;
background: #0391dd;
color: #fff;
}
#navbar nav ul li{
margin: 0 1rem;
}
#navbar nav ul li a {
padding: 0.5rem 0.75rem;
font-weight: bold;
}
#navbar nav ul li a:hover {
background: rgba(3, 7, 28);
color: #fff;
border-radius: 5px;
}
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
}
.navbar nav ul {
display: flex;
}
.showcase {
background: url('https://images.unsplash.com/photo-1542435503-956c469947f6?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=2000&q=200') no-repeat center center/cover;
height: 100vh;
width: 100%;
position: relative;
display: flex;
}
.showcase::before {
content: "";
position:absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(3, 7, 28, 0.7);
}
.showcase * {
z-index: 100;
}
h1.hero-heading {
font-size: 3.5rem;
}
p.lead-text {
margin: 0 0 1.5rem 0;
font-size: 1.5rem;
}
#showcase-content {
color: #fff;
height: 90vh;
width: 100%;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.