Created
November 6, 2018 14:12
-
-
Save bwindels/757afcece6d32b657c3d350eb6b35bdd to your computer and use it in GitHub Desktop.
scroll gradient indicator
This file contains hidden or 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
/** | |
* Scrolling shadows by @kizmarh and @leaverou | |
* Only works in browsers supporting background-attachment: local; & CSS gradients | |
* Degrades gracefully | |
*/ | |
body { | |
background: #F2F5F8; | |
font: 120% sans-serif; | |
} | |
.scrollbox { | |
overflow: auto; | |
width: 200px; | |
max-height: 200px; | |
margin: 50px auto; | |
background: | |
/* Shadow covers */ | |
linear-gradient(#F2F5F8, transparent), | |
linear-gradient(transparent, #F2F5F8); | |
background-repeat: no-repeat; | |
background-size: 100% 40px, 100% 40px; | |
background-position: top, bottom; | |
/* Opera doesn't support this in the shorthand */ | |
background-attachment: scroll, scroll; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment