scroll-initial-target
ExperimentalA property that tells the browser to automatically 'snap' to a specific element when the page first loads or when a container first appears.
Quick example
.important-section {
/* Keeps this section centered in view when the container loads */
scroll-initial-target: nearest;
} Quick facts
Initial value
noneInherited
No
Applies to
all elements
Animation type
notAnimatable
Values
nonenearest scroll-initial-target Browser Support
Limited availability 69% 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.
133+
133+