scrollbar in css code example

Example 1: css scrollbar

::-webkit-scrollbar {
  width: 10px;
}
  ::-webkit-scrollbar-track {
  background: #f1f1f1; 
}
  ::-webkit-scrollbar-thumb {
  background: #888; 
    border-radius:10px;
}
::-webkit-scrollbar-thumb:hover {
  
  background: #555; 
}

Example 2: scrollbar css

/* Works on Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: blue orange;
}

/* Works on Chrome, Edge, and Safari */
*::-webkit-scrollbar {
  width: 12px;
}

*::-webkit-scrollbar-track {
  background: orange;
}

*::-webkit-scrollbar-thumb {
  background-color: blue;
  border-radius: 20px;
  border: 3px solid orange;
}

Example 3: scrollbar css

.any-class::-webkit-scrollbar {
	width: 8px;
}
.any-class::-webkit-scrollbar-track {
	background: #c1c0c0;
}
.any-class::-webkit-scrollbar-thumb {
	background: #828282;
}
.any-class::-webkit-scrollbar-thumb:hover {
	background: #555;
}

Tags:

Css Example