css scrollbar hide code example
Example 1: hide scrollbar css
.scrollbar-hidden::-webkit-scrollbar {
display: none;
}
.scrollbar-hidden {
-ms-overflow-style: none;
scrollbar-width: none;
}
Example 2: hide horizontal scrollbar css
.x-scroll-disabled {
overflow-x: hidden;
}
Example 3: hide scrollbar css
html {
overflow: scroll;
overflow-x: hidden;
}
::-webkit-scrollbar {
width: 0px;
::-webkit-scrollbar-thumb {
background: #FF0000;
}
Example 4: hide scrollbars
//Hides scrollbars but does not allow scrolling
body {
overflow-y: hidden;
overflow-x: hidden;
}
//Hides scrollbars but keep the ability to scroll
.example::-webkit-scrollbar {
display: none;
}
.example {
-ms-overflow-style: none;
scrollbar-width: none;
}
Example 5: css stop scrollbar
html {
scrollbar-width: none;
-ms-overflow-style: none;
}
html::-webkit-scrollbar {
width: 0px;
}
Example 6: hide scrollbar html css
.hide-scrollbar::-webkit-scrollbar {
display: none;
}
.hide-scrollbar {
scrollbar-width: none;
-ms-overflow-style: none;
}