remove scroll bar code example

Example 1: hide scrollbar css

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge add Firefox */
.scrollbar-hidden {
  -ms-overflow-style: none;
  scrollbar-width: none; /* Firefox */
}

Example 2: remove scrollbar css

/* Hide scrollbar for Chrome, Safari and Opera */
.example::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE and Edge */
.example {
  -ms-overflow-style: none;
}

Example 3: hide horizontal scrollbar css

.x-scroll-disabled {
	overflow-x: hidden;
}

Example 4: css remove scrollbars

overflow-y: hidden; /* Hide vertical scrollbar */
  overflow-x: hidden; /* Hide horizontal scrollbar */

Example 5: how to eliminate scroll bar in html

html { overflow-y: hidden; }

Example 6: javascript hide scrollbar

function HideScrollbar() {
  var style = document.createElement("style");
  style.innerHTML = `body::-webkit-scrollbar {display: none;}`;
  document.head.appendChild(style);
}

Tags:

Css Example