- What is scroll snap type?
- How do I make a horizontal scrolling container?
- How do I make a div scrollable?
What is scroll snap type?
The scroll-snap-type specifies how the elements will snap into focus when you stop scrolling, and in what direction. To acheive scroll snap behaviour, the scroll-snap-type property must be set on the parent element, and the scroll-snap-align property must be set on the child elements. Default value: none.
How do I make a horizontal scrolling container?
To enable horizontal scrolling, we can use the CSS property overflow-x. If we assign the value scroll to the overflow-x property of the container element, the browser will hide horizontally overflowing content and make it accessible via horizontal scrolling.
How do I make a div scrollable?
Making a div vertically scrollable is easy by using CSS overflow property. There are different values in overflow property. For example: overflow:auto; and the axis hiding procedure like overflow-x:hidden; and overflow-y:auto;.