CSS | Scroll Snap type Last Updated : 23 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The Scroll Snap type property is an inbuilt property in the Scroll Snap module. Without the Scroll Snap module, the image gallery will look ridiculous. Before the Scroll Snap module, this effect can be achieved by JavaScript but during this days Scroll Snap with the CSS can be achieved. This property is useful to stop scrolling at some specific point of the page. You can use this property in the gallery section of your web-page. It will give you the full control of the scrolling. Syntax: scroll-snap-type: none | [ x | y | block | inline | both ] [ mandatory | proximity ] Property Values: This property uses many values as mentioned above and described below: none: This property disable the scroll snapping that will ignore the snapping points.x: This property enables the scroll snapping along with the x-axis that works on snap position of horizontal axis.y: This property enables the scroll snapping along with the y-axis that works on snap position of vertical axis.block: This property enables the scroll snapping along with the block-axis that works on snap position of block axis.inline: This property enables the scroll snapping along with the inline-axis that works on snap position of inline axis.both: This property enables the scroll snapping with the both-axis included x, y, block and inline axis.mandatory: This property enables specific strict value that go to the specific scroll position when there is no scrolling.proximity: This property enables specific strict value that go to the specific scroll position. If scrolling action gets pretty close to a snap position if not close then it will act normally and should not snap at all. Example: Below example will illustrate the Scroll Snap type property: html <!DOCTYPE html> <html> <head> <title> CSS Scroll Snap Type </title> <style> h1 { color: green; } .container { width: 500px; height: 200px; margin-left: auto; margin-right: auto; border: 2px solid black; overflow: scroll; position: relative; } .element { width: 480px; height: 180px; scroll-snap-align: start; scroll-snap-stop: normal; color: white; font-size: 50px; display: flex; justify-content: center; align-items: center; } .y-mandatory { scroll-snap-type: y mandatory; } .element:nth-child(1) { background: url("https://www.geeksforgeeks.org/wp-content/uploads/html-768x256.png"); } .element:nth-child(2) { background: url("https://www.geeksforgeeks.org/wp-content/uploads/CSS-768x256.png"); } .element:nth-child(3) { background: url("https://www.geeksforgeeks.org/wp-content/uploads/javascript-768x256.png"); } </style> </head> <body> <center> <h1>GeeksforGeeks</h1> <h4>CSS Scroll Snap Type</h4> <div class="container y-scroll y-mandatory"> <div class="wrapper"> <div class="element"></div> <div class="element"></div> <div class="element"></div> </div> </div> </center> </body> </html> Output: Supported Browsers: The browsers supported by Scroll Snap Type are listed below: Google Chrome 69 and aboveEdge 79 and aboveOpera 56 and aboveFirefox 68 and aboveSafari 11 and above Comment More infoAdvertise with us Next Article CSS | Scroll Snap type S skyridetim Follow Improve Article Tags : Web Technologies CSS CSS-Properties Similar Reads CSS | Scroll Snap stop The Scroll Snap stop property is an inbuilt property in the Scroll Snap module. The Scroll Snap stop property stops or you can lock the scroll at some specific position that you define. It works like there is a pattern in your every slide and when the user scrolls the slide the pattern automatically 2 min read CSS scroll snap The CSS Scroll Snap module is an inbuilt feature in CSS that allows developers to control the behavior of scrollable elements and their children with precision. It introduces a new method of scrolling where the viewport "snaps" to predefined points. This ensures that the content aligns perfectly in 3 min read CSS | ::-webkit-scrollbar ::-webkit-scrollbar is a pseudo-element in CSS employed to modify the look of a browser's scrollbar. Before we start with how it works and how can it be implemented, we need to know some facts about the element. Browsers like Chrome, Safari and Opera support this standard Browsers like firefox don't 3 min read CSS | Scroll Padding top The Scroll Padding top is an inbuilt property in Scroll Snap module. This property set the scroll padding top longhand. This property acts as a magnet on the top of the sliding element that stick to the top of the view-port and stop the scrolling(forcefully) in that place. The Scroll Padding propert 2 min read CSS scroll-snap-align property CSS scroll-snap-align property represents the snap position of a box's snap area within the element's or container's snap port.Syntax:scroll-snap-align: Keyword_Values;/* Or */scroll-snap-align: Global_Values;Property values: The scroll-snap-align property accepts two values mentioned above and desc 1 min read Foundation CSS Scrolling Table Foundation CSS is an open-source and responsive front-end framework created by ZURB in September 2011 that makes it simple to create stunning responsive websites, apps, and emails that operate on any device. Many companies, like Facebook, eBay, Mozilla, Adobe, and even Disney, use it. This framework 3 min read CSS Cursor Property CSS Cursor is used to specify the mouse cursor to be displayed while pointing to an element. This property is defined with zero or more <url> values that are separated by commas followed by 1 keyword value as mandatory & each <url> will point to the image file.Syntax: cursor: value;C 3 min read Bootstrap | Scrollspy Sometimes while designing the website, we include some attractive features which make the website eye-catching. One of the features is Bootstrap Scrollspy which targets the navigation bar contents automatically on scrolling the area. Example 1: Scrollspy Vertical Navigation bar HTML <!DOCTYPE htm 4 min read How To Control The Scroll Snap in Tailwind CSS? To simplify scroll snap effects, a utility-first CSS framework, Tailwind CSS, helps with some utilities. When scroll snapping is in place, users are guided through the content smoothly by snapping elements into position as they scroll down the page, resulting in a more polished and responsive experi 4 min read CSS | overscroll-behavior Property The overscroll-behavior property is used to set the behavior of the browser when the boundary of a scrolling area is reached. This property can be used to prevent unwanted scrolling in pages where there are multiple scroll areas. It is a shorthand for the overscroll-behavior-x and overscroll-behavio 5 min read Like