Last active
March 31, 2021 01:30
-
-
Save MelodicCrypter/b0872d56b760a2457ba54d4a0b16a3b8 to your computer and use it in GitHub Desktop.
Image with overlay text CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#theElement { | |
background-image: | |
linear-gradient(to bottom, rgba(245, 246, 252, 0.52), rgba(117, 19, 93, 0.73)), | |
url('images/background.jpg'); | |
width: 80%; | |
height: 400px; | |
background-size: cover; | |
color: white; | |
padding: 20px; | |
} | |
// Snippet from: | |
// https://webdevetc.com/blog/how-to-add-a-gradient-overlay-to-a-background-image-using-just-css-and-html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id='theElement'>Smaple Text Here</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment