Any way to disable CSS scroll snap points?

2.4k Views Asked by At

I have a single-page mobile bootstrap site that when scrolling, the fixed navigation bar covers over the section titles when tapping on a link in the navigation menu. I found that this is being caused by CSS scroll snap points. I tried to set scroll-snap-type: none; on the .section class for all sections but it still produces the bug. How do I properly disable CSS scroll snap points for the entire page?

1

There are 1 best solutions below

2
On

May be it will help. Try below

 * Keyword values */
scroll-snap-type: none;
scroll-snap-type: mandatory;
scroll-snap-type: proximity;

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

As same as Y follow.(scroll-snap-type-y)

   /* Keyword values */
scroll-snap-type-x: none;
scroll-snap-type-x: mandatory;
scroll-snap-type-x: proximity;

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