OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <style> | |
3 ::-webkit-scrollbar { | |
4 height: 10px; | |
5 width: 10px | |
6 } | |
7 ::-webkit-scrollbar-thumb { | |
8 background: rgba(255,0,0,0.8); | |
9 } | |
10 html { | |
11 overflow-y: scroll; | |
12 } | |
13 </style> | |
14 <script> | |
15 if (window.testRunner) | |
16 testRunner.waitUntilDone(); | |
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){ | |
21 return p+":"+css[p] | |
22 }).join(";"); | |
23 sheet.insertRule(selector + "{" + propText + "}", sheet.cssRules.length); | |
24 }; | |
25 function addstyle() { | |
26 addRule("::-webkit-scrollbar-thumb", { | |
27 background: "rgba(13,53,178,0.8)", | |
28 }); | |
29 if (window.testRunner) | |
30 testRunner.notifyDone(); | |
31 }; | |
32 setTimeout(function() {addstyle();}, 1); | |
rune
2014/11/07 10:58:08
I still think it would be more robust if you put t
MuVen
2014/11/07 11:33:54
Done.
| |
33 </script> | |
34 <div style="height:700px"></div> | |
OLD | NEW |