Skip to content

Instantly share code, notes, and snippets.

@aarongustafson
Created March 16, 2015 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarongustafson/bdc0efc31cbc7c1308c7 to your computer and use it in GitHub Desktop.
Save aarongustafson/bdc0efc31cbc7c1308c7 to your computer and use it in GitHub Desktop.
Scroll Snap Points
.container {
width: 500px;
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
/* Set up points to which scrolling will snap */
-ms-scroll-snap-points-x: snapInterval(0px, 100%);
/* Require that scrolling always end at a snap point */
-ms-scroll-snap-type: mandatory;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment