Answers for "how to style scrollbar in div"

CSS
6

how to style scrollbar in div

#style-1::-webkit-scrollbar-track
{
	-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
	border-radius: 10px;
	background-color: #F5F5F5;
}

#style-1::-webkit-scrollbar
{
	width: 12px;
	background-color: #F5F5F5;
}

#style-1::-webkit-scrollbar-thumb
{
	border-radius: 10px;
	-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
	background-color: #555;
}
Posted by: Guest on July-30-2020
2

coustomize srollbar

::-webkit-scrollbar {
    width: 12px;
}
 
::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
    border-radius: 10px;
}
 
::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}
Posted by: Guest on August-28-2020
7

custom scroll bar

/* width */
*::-webkit-scrollbar {
  width: 10px;
}

/* Track */
*::-webkit-scrollbar-track {
  background: #f1f1f1; 
}
 
/* Handle */
*::-webkit-scrollbar-thumb {
  background: #888; 
}

/* Handle on hover */
*::-webkit-scrollbar-thumb:hover {
  background: #555; 
}
Posted by: Guest on May-26-2020
0

customize scrollbar css

// scroll bar
/* width */
::-webkit-scrollbar {
  background-color: hsl(235, 24%, 19%);
  width: 8px;
}

/* Track */
::-webkit-scrollbar-track {
  background-color: hsla(235, 21%, 11%, 0.322);
  box-shadow: 0 0 3px hsl(235, 21%, 11%);
  border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background-color: hsl(235, 21%, 11%);
  border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: hsl(220, 98%, 61%);
}
Posted by: Guest on January-06-2021
1

style scrollbar

/* Chrome, safari */
*::-webkit-scrollbar {
	width: 8px;
}

*::-webkit-scrollbar-thumb {
	background-color: gray;
}

/* Firefox */
.selector {
		scrollbar-width: none;
	}
Posted by: Guest on June-04-2021

Browse Popular Code Answers by Language