:target-before
Limited availability72% of usersExperimental
An experimental pseudo-class that matches a 'scroll marker' when it represents an item that comes BEFORE the current viewport in a scroll container.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyComingNot in Firefox or Safari yet, so not every major browser supports it.
See how modern your own CSS is.Check your CSS →
Quick example
.carousel::scroll-marker:target-before {
/* Adds an indicator or fades out markers for items the user has already scrolled past */
opacity: 0.2;
}:target-before browser support
BaselineLimited availabilityThis feature is not Baseline because it does not work in some of the most widely-used browsers.Not ready for production without a fallback.
Usage72%of people can use this28% use a browser without it.
Browsers
142+
142+Mobile
142+Android