7 ::-webkit-scrollbar-thumb {
8 background: rgba(
255,
0,
0,
0.8);
14 <div style=
"height:700px"></div>
15 <script src=
"../resources/run-after-layout-and-paint.js"></script>
17 var styleElement
= document
.createElement("style");
18 var sheet
= document
.head
.appendChild(styleElement
).sheet
;
19 function addRule(selector
, css
){
20 var propText
= Object
.keys(css
).map(function(p
){
23 sheet
.insertRule(selector
+ "{" + propText
+ "}", sheet
.cssRules
.length
);
25 runAfterLayoutAndPaint(function() {
26 addRule("::-webkit-scrollbar-thumb", {background
: "rgba(13,53,178,0.8)",});