<!DOCTYPE HTML>
<style>
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
-webkit-border-radius: 10px;
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
-webkit-border-radius: 1px;
background: rgba(255,0,0,0.8);
-webkit-box-shadow: inset 0 0 1px rgba(255,250,0,0.5);
}
#space {
width: 1000px;
height: 1000px;
}
html {
overflow: scroll;
}
</style>
<div id="space"></div>
<script>
var styleElement = document.createElement("style");
var sheet = document.head.appendChild(styleElement).sheet;
document.body.offsetTop;
sheet.insertRule("::-webkit-scrollbar { width: 100px;}", 0);
</script>