Skip to content

Instantly share code, notes, and snippets.

View fortybelowzero's full-sized avatar
💭
Lurking

Rick Harrison fortybelowzero

💭
Lurking
View GitHub Profile
@fortybelowzero
fortybelowzero / css-darken-element.md
Last active May 24, 2018 23:14
Add a dark wash to an element (eg a Hero, or darken an image) with CSS

Add a dark wash to an element (eg a Hero, or darken an image) with CSS

(This example snippet is in SCSS/Sass. Note that children of the element with the darken class will be set to position: relative; z-index: 1 so that any child content sits above the dark wash)

(tested and working with Internet Explorer 11 (IE11) and above, Chrome & Firefox - should be widely supported)

Example usage