This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.


The scroll-snap-destination CSS property defines the position in x and y coordinates within the scroll container's visual viewport which element snap points align with.

Initial value0px 0px
Applies toscroll containers
Percentagesrelative to same axis of the padding-box of the scroll container
Computed valueas specified, but with relative lengths converted into absolute lengths
Animatableyes, as a position
Canonical orderthe unique non-ambiguous order defined by the formal grammar


/* <position> value */
scroll-snap-destination: 400px 600px;

/* Global values */
scroll-snap-destination: inherit;
scroll-snap-destination: initial;
scroll-snap-destination: unset;


Specifies the offset of the snap destination from the start edge of the scroll container’s visual viewport. The first value gives the x coordinate of the snap destination, the second value its y coordinate.

Formal syntax


<position> = [[ left | center | right | top | bottom | <percentage> | <length> ] | [ left | center | right | <percentage> | <length> ] [ top | center | bottom | <percentage> | <length> ] | [ center | [ left | right ] [ <percentage> | <length> ]? ] && [ center | [ top | bottom ] [ <percentage> | <length> ]? ]]


HTML Content

<div id="container">
    <p>At coordinate (0, 0)</p>
    <div class="scrollContainer destination0">

    <p>At coordinate (25, 0)</p>
    <div class="scrollContainer destination25">

    <p>At coordinate (50, 0)</p>
    <div class="scrollContainer destination50">

CSS Content

#container {
  display: flex;

#container > div:nth-child(-n+2) {
  margin-right: 20px;  

.scrollContainer {
  width: 100px;
  overflow: auto;
  white-space: nowrap;
  scroll-snap-points-x: repeat(100%);
  scroll-snap-type: mandatory;
  scroll-snap-destination: 20px 0;
  font-size: 0;

.destination0 {
  scroll-snap-destination: 0 0;

.destination25 {
  scroll-snap-destination: 25px 0;

.destination50 {
  scroll-snap-destination: 50px 0;

.scrollContainer > div {
  width: 100px;
  height: 100px;
  display: inline-block;
  line-height: 100px;
  text-align: center;
  font-size: 50px;

.scrollContainer > div:nth-child(even) {
  background-color: #87EA87;

.scrollContainer > div:nth-child(odd) {
  background-color: #87CCEA;


Specification Status Comment
CSS Scroll Snap Points Module Level 1
The definition of 'scroll-snap-destination' in that specification.
Working Draft Initial definition

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support ? 39.0 (39.0) No support No support No support
Feature Android Firefox Mobile (Gecko) Firefox OS IE Phone Opera Mobile Safari Mobile
Basic support No support 39.0 (39.0)[1] 39.0 (39.0) No support No support No support

[1] On Firefox Mobile, available since Gecko 39, but behind the preference layout.css.vertical-text.enabled, disabled by default.

Document Tags and Contributors

 Contributors to this page: Sebastianz, fscholz, teoli
 Last updated by: Sebastianz,