Debian Codegraph @

demos/styled-scrollbars/index.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
6
7 <title>iScroll demo: styled scrollbars</title>
8
9 <script type="text/javascript" src="../../build/iscroll.js"></script>
10
11 <script type="text/javascript">
12
13 var myScroll;
14
15 function loaded () {
16 myScroll = new IScroll('#wrapper', { scrollX: true, scrollbars: 'custom' });
17 }
18
19 document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
20
21 </script>
22
23 <style type="text/css">
24
25 /* Styled scrollbars */
26
27 .iScrollHorizontalScrollbar {
28 position: absolute;
29 z-index: 9999;
30 height: 16px;
31 left: 2px;
32 right: 2px;
33 bottom: 2px;
34 overflow: hidden;
35 }
36
37 .iScrollHorizontalScrollbar.iScrollBothScrollbars {
38 right: 18px;
39 }
40
41 .iScrollVerticalScrollbar {
42 position: absolute;
43 z-index: 9999;
44 width: 16px;
45 bottom: 2px;
46 top: 2px;
47 right: 2px;
48 overflow: hidden;
49 }
50
51 .iScrollVerticalScrollbar.iScrollBothScrollbars {
52 bottom: 18px;
53 }
54
55 .iScrollIndicator {
56 position: absolute;
57 background: #cc3f6e;
58 border-width: 1px;
59 border-style: solid;
60 border-color: #EB97B4 #7C2845 #7C2845 #EB97B4;
61 border-radius: 8px;
62 }
63
64 .iScrollHorizontalScrollbar .iScrollIndicator {
65 height: 100%;
66 background: -moz-linear-gradient(left, #cc3f6e 0%, #93004e 100%);
67 background: -webkit-linear-gradient(left, #cc3f6e 0%,#93004e 100%);
68 background: -o-linear-gradient(left, #cc3f6e 0%,#93004e 100%);
69 background: -ms-linear-gradient(left, #cc3f6e 0%,#93004e 100%);
70 background: linear-gradient(to right, #cc3f6e 0%,#93004e 100%);
71 }
72
73 .iScrollVerticalScrollbar .iScrollIndicator {
74 width: 100%;
75 background: -moz-linear-gradient(top, #cc3f6e 0%, #93004e 100%);
76 background: -webkit-linear-gradient(top, #cc3f6e 0%,#93004e 100%);
77 background: -o-linear-gradient(top, #cc3f6e 0%,#93004e 100%);
78 background: -ms-linear-gradient(top, #cc3f6e 0%,#93004e 100%);
79 background: linear-gradient(to bottom, #cc3f6e 0%,#93004e 100%);
80 }
81
82
83 /* end */
84
85 * {
86 -webkit-box-sizing: border-box;
87 -moz-box-sizing: border-box;
88 box-sizing: border-box;
89 }
90
91 html {
92 -ms-touch-action: none;
93 }
94
95 body,ul,li {
96 padding: 0;
97 margin: 0;
98 border: 0;
99 }
100
101 body {
102 font-size: 12px;
103 font-family: ubuntu, helvetica, arial;
104 overflow: hidden; /* this is important to prevent the whole page to bounce */
105 }
106
107 #header {
108 position: absolute;
109 z-index: 2;
110 top: 0;
111 left: 0;
112 width: 100%;
113 height: 45px;
114 line-height: 45px;
115 background: #CD235C;
116 padding: 0;
117 color: #eee;
118 font-size: 20px;
119 text-align: center;
120 font-weight: bold;
121 }
122
123 #footer {
124 position: absolute;
125 z-index: 2;
126 bottom: 0;
127 left: 0;
128 width: 100%;
129 height: 48px;
130 background: #444;
131 padding: 0;
132 border-top: 1px solid #444;
133 }
134
135 #wrapper {
136 position: absolute;
137 z-index: 1;
138 top: 45px;
139 bottom: 48px;
140 left: 0;
141 width: 100%;
142 background: #ccc;
143 overflow: hidden;
144 }
145
146 #scroller {
147 position: absolute;
148 z-index: 1;
149 -webkit-tap-highlight-color: rgba(0,0,0,0);
150 width: 2000px;
151 -webkit-transform: translateZ(0);
152 -moz-transform: translateZ(0);
153 -ms-transform: translateZ(0);
154 -o-transform: translateZ(0);
155 transform: translateZ(0);
156 -webkit-touch-callout: none;
157 -webkit-user-select: none;
158 -moz-user-select: none;
159 -ms-user-select: none;
160 user-select: none;
161 -webkit-text-size-adjust: none;
162 -moz-text-size-adjust: none;
163 -ms-text-size-adjust: none;
164 -o-text-size-adjust: none;
165 text-size-adjust: none;
166 }
167
168 #scroller ul {
169 list-style: none;
170 padding: 0;
171 margin: 0;
172 width: 100%;
173 text-align: left;
174 }
175
176 #scroller li {
177 padding: 0 10px;
178 height: 40px;
179 line-height: 40px;
180 border-bottom: 1px solid #ccc;
181 border-top: 1px solid #fff;
182 background-color: #fafafa;
183 font-size: 14px;
184 }
185
186 </style>
187 </head>
188 <body onload="loaded()">
189 <div id="header">iScroll</div>
190
191 <div id="wrapper">
192 <div id="scroller">
193 <ul>
194 <li>Pretty row 1</li>
195 <li>Pretty row 2</li>
196 <li>Pretty row 3</li>
197 <li>Pretty row 4</li>
198 <li>Pretty row 5</li>
199 <li>Pretty row 6</li>
200 <li>Pretty row 7</li>
201 <li>Pretty row 8</li>
202 <li>Pretty row 9</li>
203 <li>Pretty row 10</li>
204 <li>Pretty row 11</li>
205 <li>Pretty row 12</li>
206 <li>Pretty row 13</li>
207 <li>Pretty row 14</li>
208 <li>Pretty row 15</li>
209 <li>Pretty row 16</li>
210 <li>Pretty row 17</li>
211 <li>Pretty row 18</li>
212 <li>Pretty row 19</li>
213 <li>Pretty row 20</li>
214 <li>Pretty row 21</li>
215 <li>Pretty row 22</li>
216 <li>Pretty row 23</li>
217 <li>Pretty row 24</li>
218 <li>Pretty row 25</li>
219 <li>Pretty row 26</li>
220 <li>Pretty row 27</li>
221 <li>Pretty row 28</li>
222 <li>Pretty row 29</li>
223 <li>Pretty row 30</li>
224 <li>Pretty row 31</li>
225 <li>Pretty row 32</li>
226 <li>Pretty row 33</li>
227 <li>Pretty row 34</li>
228 <li>Pretty row 35</li>
229 <li>Pretty row 36</li>
230 <li>Pretty row 37</li>
231 <li>Pretty row 38</li>
232 <li>Pretty row 39</li>
233 <li>Pretty row 40</li>
234 <li>Pretty row 41</li>
235 <li>Pretty row 42</li>
236 <li>Pretty row 43</li>
237 <li>Pretty row 44</li>
238 <li>Pretty row 45</li>
239 <li>Pretty row 46</li>
240 <li>Pretty row 47</li>
241 <li>Pretty row 48</li>
242 <li>Pretty row 49</li>
243 <li>Pretty row 50</li>
244 </ul>
245 </div>
246 </div>
247
248 <div id="footer"></div>
249
250 </body>
251 </html>