OLD | NEW |
---|---|
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <style> | 2 <style> |
3 ::-webkit-scrollbar { | 3 ::-webkit-scrollbar { |
4 width: 12px; | 4 width: 12px; |
5 height: 12px; | 5 height: 12px; |
6 } | 6 } |
7 ::-webkit-scrollbar-track { | 7 ::-webkit-scrollbar-track { |
8 -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); | 8 -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); |
9 -webkit-border-radius: 10px; | 9 -webkit-border-radius: 10px; |
10 border-radius: 10px; | 10 border-radius: 10px; |
11 } | 11 } |
12 ::-webkit-scrollbar-thumb { | 12 ::-webkit-scrollbar-thumb { |
13 -webkit-border-radius: 10px; | 13 -webkit-border-radius: 10px; |
rune
2015/01/20 15:48:12
Do you need things like border-radius, box-shadow
MuVen
2015/01/21 06:14:09
Done.
| |
14 border-radius: 10px; | 14 border-radius: 10px; |
15 background: rgba(255,0,0,0.8); | 15 background: rgba(255,0,0,0.8); |
16 -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); | 16 -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); |
17 } | 17 } |
18 ::-webkit-scrollbar-thumb:window-inactive { | |
19 background: rgba(255,150,250,0.8); | |
20 } | |
21 html { | 18 html { |
22 overflow: scroll; | 19 overflow: scroll; |
23 } | 20 } |
24 body { | 21 body { |
25 width: 1000px; | 22 width: 1000px; |
26 height: 1000px; | 23 height: 1000px; |
27 } | 24 } |
rune
2015/01/20 15:48:12
When using "overflow: scroll" on html, do you real
MuVen
2015/01/21 06:14:09
Yes to display custom scrollbars on the main frame
| |
28 div { | 25 div { |
29 width: 100px; | 26 width: 100px; |
30 height: 100px; | 27 height: 100px; |
31 overflow: scroll; | 28 overflow: scroll; |
32 } | 29 } |
33 </style> | 30 </style> |
34 <body> | 31 <body> |
rune
2015/01/20 15:48:12
Drop <body>
MuVen
2015/01/21 06:14:09
Done.
| |
35 <iframe src="resources/scrollable-iframe-customscrollbar.html"></iframe> | 32 <iframe src="resources/scrollable-iframe-customscrollbar-windowinactive.html"></ iframe> |
36 <div><p style="width:200px;height:200px"></p></div> | 33 <div><p style="width:200px;height:200px"></p></div> |
37 <div><p style="width:200px;height:200px"></p></div> | 34 <div><p style="width:200px;height:200px"></p></div> |
rune
2015/01/20 15:48:12
overflow:scroll in the stylesheet should make the
MuVen
2015/01/21 06:14:09
I have replaced p element with div element, just t
| |
38 </body> | 35 </body> |
39 <script> | 36 <script> |
40 window.onload = function() { | 37 window.onload = function() { |
41 // setWindowIsKey shall set the focus of the window. | 38 // setWindowIsKey shall set the focus of the window. |
42 if (window.testRunner) | 39 if (window.testRunner) |
43 window.testRunner.setWindowIsKey(false); | 40 window.testRunner.setWindowIsKey(false); |
44 } | 41 } |
45 </script> | 42 </script> |
OLD | NEW |