I put together several different answers in SO in the following snippet, which should work on all, if not most, modern browsers, as it seems to me. All you have to do is add a CSS class .disable-scrollbars
to the element, to which .disable-scrollbars
you want to apply it.
.disable-scrollbars::-webkit-scrollbar {
width: 0px;
background: transparent;
}
.disable-scrollbars {
scrollbar-width: none;
-ms-overflow-style: none;
}
And if you want to use SCSS / SASS:
.disable-scrollbars {
scrollbar-width: none;
-ms-overflow-style: none;
&::-webkit-scrollbar {
width: 0px;
background: transparent;
}
}
source
share