CSS Scroll Shadows!
Adjust the controls (👇) and see the CSS scroll shadows change
Scroll down and watch the CSS scroll shadows disappear/appear...
.scrollGradient {
background:
linear-gradient(#ffffff 33%, rgba(255,255,255, 0)),
linear-gradient(rgba(255,255,255, 0), #ffffff 66%) 0 100%,
radial-gradient(farthest-side at 50% 0, rgba(0,0,0, 0.5), rgba(0,0,0,0)),
radial-gradient(farthest-side at 50% 100%, rgba(0,0,0, 0.5), rgba(0,0,0,0)) 0 100%;
background-color: #ffffff;
background-repeat: no-repeat;
background-attachment: local, local, scroll, scroll;
background-size: 100% 15px, 100% 15px, 100% 5px, 100% 5px;
}
If you want to learn how this works check this article by Lea Verou.
Watch out for some iOS versions! background-attachment: local
didn't work on IOS 13 and
14 but has been fixed and works again on iOS 15+.