JSFiddle - React, Tailwind, and code Playground
by NerfAnarchist
HTML
<div style="height:5000px;">asdfasdf</div>
CSS
::-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;
background-color: #006E00;
-moz-box-shadow: inset 0 0 8px #000000;
-webkit-box-shadow: inset 0 0 8px #000000;
box-shadow: inset 0 0 8px #000000;
/* button gradient to get the gradient code go to http://www.colorzilla.com/gradient-editor/ */
background: #25d958; /* Old browsers */
background: -moz-linear-gradient(left, #25d958 0%, #1da541 24%, #067824 50%, #1a923a 79%, #1fb146 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#25d958), color-stop(24%,#1da541), color-stop(50%,#067824), color-stop(79%,#1a923a), color-stop(100%,#1fb146)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #25d958 0%,#1da541 24%,#067824 50%,#1a923a 79%,#1fb146 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #25d958 0%,#1da541 24%,#067824 50%,#1a923a 79%,#1fb146 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, #25d958 0%,#1da541 24%,#067824 50%,#1a923a 79%,#1fb146 100%); /* IE10+ */
background: linear-gradient(to right, #25d958 0%,#1da541 24%,#067824 50%,#1a923a 79%,#1fb146 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#25d958', endColorstr='#1fb146',GradientType=1 ); /* IE6-9 */
}
JavaScript
// scrollbar testing