css scroll hidden code example
Example 1: how to remove scrollbars using javscript
body {
overflow-y: hidden; /* Hide vertical scrollbar */
overflow-x: hidden; /* Hide horizontal scrollbar */
}
Example 2: javascript hide scrollbar
function HideScrollbar() {
var style = document.createElement("style");
style.innerHTML = `body::-webkit-scrollbar {display: none;}`;
document.head.appendChild(style);
}