Categories
CSS

How to disable scrolling when touch moving certain element with CSS?

Spread the love

Sometimes, we want to disable scrolling when touch moving certain element with CSS.

In this article, we’ll look at how to disable scrolling when touch moving certain element with CSS.

How to disable scrolling when touch moving certain element with CSS?

To disable scrolling when touch moving certain element with CSS, we set the element’s touch-action CSS style to none.

For instance, we write

touch-action: none;

to disable touch on the element when moving certain element when we add this style to our CSS.

Conclusion

To disable scrolling when touch moving certain element with CSS, we set the element’s touch-action CSS style to none.

Leave a Reply

Your email address will not be published.

If you like the content of this blog, subscribe to my email list to get exclusive articles not available to anyone else.