Skip to content

Instantly share code, notes, and snippets.

@codewithbernard
Created December 26, 2021 07:56
Show Gist options
  • Save codewithbernard/8945e2764b08a9fb008643f05e590268 to your computer and use it in GitHub Desktop.
Save codewithbernard/8945e2764b08a9fb008643f05e590268 to your computer and use it in GitHub Desktop.
.article {
height: 100%;
position: relative;
overflow: hidden;
}
.image {
object-fit: cover;
width: 100%;
height: 100%;
}
.header {
font-size: 80px;
color: white;
text-align: center;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: fit-content;
margin: auto;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment