css no scroll code example
Example 1: hide scrollbar css
.scrollbar-hidden::-webkit-scrollbar {
display: none;
}
.scrollbar-hidden {
-ms-overflow-style: none;
scrollbar-width: none;
}
Example 2: remove scrollbar css
.example::-webkit-scrollbar {
display: none;
}
.example {
-ms-overflow-style: none;
}
Example 3: hide scrollbars
body {
overflow-y: hidden;
overflow-x: hidden;
}
.example::-webkit-scrollbar {
display: none;
}
.example {
-ms-overflow-style: none;
scrollbar-width: none;
}
Example 4: css no scroll
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 5000px;
width: 5000px;
overflow: hidden;
}
</style>
</head>
<body>
<h2>Hide scrollbars</h2>
<p>This example will hide the scrollbars (and the functionality - it is not possible to scroll inside the page).</p>
<p>Try to remove <strong>overflow: hidden;</strong> to see the effect.</p>
</body>
</html>
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;
}