how to hide scrollbar in overflow scroll 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: css hide scrollbar

// Sass Mixing
@mixin hideScrollbar {
  &::-webkit-scrollbar {
    width: 0 !important
  }
  -ms-overflow-style: none;
  scrollbar-width: none;
}

Example 3: hide the scrollbar in css if not overflow

.myClass {
  /*auto will remove and add the scroll bar as needed*/
  overflow: auto;
}

Example 4: how to make scrollbar hidden

overflow: hidden;

Tags:

Html Example