Skip to content

Instantly share code, notes, and snippets.

@steveoh
Created June 18, 2019 16:32
Show Gist options
  • Save steveoh/21dbf46ab4566700d10e1b02397017b3 to your computer and use it in GitHub Desktop.
Save steveoh/21dbf46ab4566700d10e1b02397017b3 to your computer and use it in GitHub Desktop.
fade the bottom of an element
.shorten-sm {
height: 50px;
overflow: hidden;
position: relative;
}
.shorten-sm:before {
content: '';
width: 100%;
height: 100%;
position: absolute;
background: linear-gradient(transparent 50px, #f9f9f9);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment