scroll-axis-lock
Limited availability16% of usersExperimental
When you scroll mostly in one direction, a browser may lock the scroll to that one axis. scroll-axis-lock: none turns that off for a scroll container, so diagonal scrolling stays diagonal. The default, auto, lets the browser lock. Set it on the root element to cover the page. Setting it on body does not reach the page. Only Chrome on desktop supports it so far, from version 153.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyComingNot in Edge, 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
auto- Inherited
- No
- Applies to
- scroll containers
- Animation type
- discrete
Quick example
.map-viewport {
overflow: scroll;
scroll-axis-lock: none;
}Values
autononescroll-axis-lock 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.
Usage16%of people can use this84% use a browser without it.
Browsers
153+