OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 ::-webkit-scrollbar { |
| 4 width: 10px |
| 5 } |
| 6 ::-webkit-scrollbar-thumb { |
| 7 background: rgba(255,0,0,0.8); |
| 8 } |
| 9 div { |
| 10 overflow-y: scroll; |
| 11 } |
| 12 </style> |
| 13 <div style="height:300px;width:300px"> |
| 14 The quick brown fox jumps over the lazy dog The quick brown fox jumps over the l
azy dog |
| 15 The quick brown fox jumps over the lazy dog The quick brown fox jumps over the l
azy dog |
| 16 The quick brown fox jumps over the lazy dog The quick brown fox jumps over the l
azy dog |
| 17 The quick brown fox jumps over the lazy dog The quick brown fox jumps over the l
azy dog |
| 18 The quick brown fox jumps over the lazy dog The quick brown fox jumps over the l
azy dog |
| 19 The quick brown fox jumps over the lazy dog The quick brown fox jumps over the l
azy dog |
| 20 The quick brown fox jumps over the lazy dog The quick brown fox jumps over the l
azy dog |
| 21 The quick brown fox jumps over the lazy dog The quick brown fox jumps over the l
azy dog |
| 22 The quick brown fox jumps over the lazy dog The quick brown fox jumps over the l
azy dog |
| 23 The quick brown fox jumps over the lazy dog The quick brown fox jumps over the l
azy dog |
| 24 The quick brown fox jumps over the lazy dog The quick brown fox jumps over the l
azy dog |
| 25 </div> |
| 26 <script> |
| 27 var styleElement = document.createElement("style"); |
| 28 var sheet = document.head.appendChild(styleElement).sheet; |
| 29 function addRule(selector, css){ |
| 30 var propText = Object.keys(css).map(function(p){ |
| 31 return p+":"+css[p] |
| 32 }).join(";"); |
| 33 sheet.insertRule(selector + "{" + propText + "}", sheet.cssRules.length); |
| 34 }; |
| 35 document.body.offsetTop; |
| 36 addRule("::-webkit-scrollbar", {width: "200px",}); |
| 37 if (window.testRunner) |
| 38 testRunner.dumpAsTextWithPixelResults(); |
| 39 </script> |
OLD | NEW |