scroolbar hide css code example

Example 1: hide scrollbar css

/* A very quick an applicable solution is to use this piece of code: */
html {
overflow: scroll;
overflow-x: hidden;
}
::-webkit-scrollbar {
width: 0px; /* remove scrollbar space /
background: transparent; / optional: just make scrollbar invisible /
}
/ optional: show position indicator in red */
::-webkit-scrollbar-thumb {
background: #FF0000;
}

Example 2: how to hide scrollbar css

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

Tags:

Css Example