:target-after

Experimental

An experimental pseudo-class that matches a 'scroll marker' when it represents an item that comes AFTER the current viewport in a scroll container.

Quick example

.carousel::scroll-marker:target-after {
  /* Adds an indicator or fades out markers for items the user hasn't seen yet */
  opacity: 0.2;
}

:target-after Browser Support

Limited availability 62% global usage

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Not ready for production without a fallback.

142+
142+
ESC