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 function addstyle(){ | |
18 var addRule = (function(style){ | |
19 var sheet = document.head.appendChild(style).sheet; | |
skobes
2014/11/07 00:13:59
I think this would be easier to understand if the
MuVen
2014/11/07 09:46:59
Done.
| |
20 return function(selector, css){ | |
21 var propText = Object.keys(css).map(function(p){ | |
22 return p+":"+css[p] | |
23 }).join(";"); | |
24 sheet.insertRule(selector + "{" + propText + "}", sheet.cssRules.len gth); | |
25 } | |
26 })(document.createElement("style")); | |
27 | |
28 addRule("::-webkit-scrollbar-thumb", { | |
29 background: "rgba(13,53,178,0.8)", | |
30 }); | |
31 if (window.testRunner) | |
32 testRunner.notifyDone(); | |
33 }; | |
34 setTimeout(function() {addstyle();}, 1); | |
35 </script> | |
36 <div style="height:700px"></div> | |
OLD | NEW |