Skip to content

Instantly share code, notes, and snippets.

@erbmicha
Last active December 14, 2015 09:29
Show Gist options
  • Save erbmicha/5065592 to your computer and use it in GitHub Desktop.
Save erbmicha/5065592 to your computer and use it in GitHub Desktop.
CSS page indent shadow at top/bottom for scrolling section
/* top and bottom */
background:
linear-gradient(hsla(0,0%,100%,0) 15px, white 40px),
linear-gradient(to top, hsla(0,0%,100%,0) 15px, white 40px) bottom;
radial-gradient(at 50% 0, rgba(0,0,0,.2), transparent 70%),
radial-gradient(at 50% 100%, rgba(0,0,0,.2), transparent 70%) bottom;
background-repeat: no-repeat;
background-size: 100% 50%, 100% 50%, 100% 14px, 100% 14px;
background-attachment: local, local, scroll, scroll;
/* top */
background:
linear-gradient(white, white),
radial-gradient(at 50% 0, rgba(0,0,0,.2), transparent 70%);
background-size: 100% 50px, 100% 15px;
background-repeat: no-repeat;
background-attachment: local, scroll;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment