<div class="hero">
<img class="hero__img" src="http://images.vfl.ru/ii/1568893523/c9258e21/27915042.jpg" alt="">
<div class="hero__container">
<div class="hero__description">
<h1 class="hero__title">Become an outstanding List</h1>
<h3 class="hero__subtitle">Through one of our training programs at MSCoL</h3>
<a href="/" class="hero__button hero__button--desktop">Join the team</a>
</div>
</div>
</div>
<section class="not-hero">
<a href="/" class="hero__button hero__button--mobile">Join the team</a>
</section>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.hero {
position: relative;
}
.hero__container {
width: 100%;
max-width: 900px;
margin: 0 auto;
padding: 100px 20px 50px;
}
.hero__img {
position: absolute;
top: 0;
left: 0;
z-index: -1;
display: block;
width: 100%;
height: 100%;
object-fit: cover;
object-position: 50% 70%;
}
.hero__button {
display: inline-block;
padding: 10px;
color: #fff;
background: #CD3C51;
}
.hero__button--mobile {
display: none;
}
.not-hero {
padding: 20px;
}
@media (max-width: 768px) {
.hero__button--mobile {
display: block;
}
.hero__button--desktop {
display: none;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.