no scroll bar css code example
Example 1: remove scrollbar css
.example::-webkit-scrollbar {
display: none;
}
.example {
-ms-overflow-style: none;
}
Example 2: 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 3: javascript hide scrollbar
function HideScrollbar() {
var style = document.createElement("style");
style.innerHTML = `body::-webkit-scrollbar {display: none;}`;
document.head.appendChild(style);
}