scroll-initial-target
Limited availability71% of usersExperimental
A property that tells the browser to automatically 'snap' to a specific element when the page first loads or when a container first appears.
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 facts
- Initial value
none- Inherited
- No
- Applies to
- all elements
- Animation type
- notAnimatable
Quick example
.important-section {
/* Keeps this section centered in view when the container loads */
scroll-initial-target: nearest;
}Values
nonenearestscroll-initial-target 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.
Usage71%of people can use this29% use a browser without it.
Browsers
133+
133+Mobile
133+Android