scroll-initial-target
A property that tells the browser to automatically 'snap' to a specific element when the page first loads or when a container first appears.
It is documented as part of the CSS Scroll Snap specification. This is an experimental technology. The syntax and behavior are still subject to change.
Syntax
/* Usage Example */
.important-section {
/* Keeps this section centered in view when the container loads */
scroll-initial-target: nearest;
}
/* Syntax */
scroll-initial-target: none;
scroll-initial-target: nearest;
/* Global values */
scroll-initial-target: inherit;
scroll-initial-target: initial;
scroll-initial-target: revert;
scroll-initial-target: revert-layer;
scroll-initial-target: unset;
scroll-initial-target Browser support
Limited availability
Since
2020 69% global usage
This feature is not Baseline because it does not work in some of the most widely-used browsers.
133+
133+