Debian Codegraph @

demos/minimap/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: minimap</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', {
17 startX: -359,
18 startY: -85,
19 scrollY: true,
20 scrollX: true,
21 freeScroll: true,
22 mouseWheel: true,
23 indicators: {
24 el: document.getElementById('minimap'),
25 interactive: true
26 }
27 });
28 }
29
30 //document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
31
32 </script>
33
34 <style type="text/css">
35 * {
36 -webkit-box-sizing: border-box;
37 -moz-box-sizing: border-box;
38 box-sizing: border-box;
39 }
40
41 html {
42 -ms-touch-action: none;
43 }
44
45 body,ul,li {
46 padding: 0;
47 margin: 0;
48 border: 0;
49 }
50
51 body {
52 font-size: 12px;
53 font-family: ubuntu, helvetica, arial;
54 overflow: hidden; /* this is important to prevent the whole page to bounce */
55 }
56
57 #header {
58 position: absolute;
59 z-index: 2;
60 top: 0;
61 left: 0;
62 width: 100%;
63 height: 45px;
64 line-height: 45px;
65 background: #CD235C;
66 padding: 0;
67 color: #eee;
68 font-size: 20px;
69 text-align: center;
70 font-weight: bold;
71 }
72
73 #footer {
74 position: absolute;
75 z-index: 2;
76 bottom: 0;
77 left: 0;
78 width: 100%;
79 height: 48px;
80 background: #444;
81 padding: 0;
82 border-top: 1px solid #444;
83 }
84
85 #wrapper {
86 position: absolute;
87 z-index: 1;
88 width: 235px;
89 height: 321px;
90 top: 0;
91 left: 0;
92 background: #555;
93 overflow: hidden;
94 }
95
96 #scroller {
97 position: absolute;
98 z-index: 1;
99 width: 797px;
100 height: 1087px;
101 background: url(ermine.jpg);
102 -webkit-tap-highlight-color: rgba(0,0,0,0);
103 -webkit-transform: translateZ(0);
104 -moz-transform: translateZ(0);
105 -ms-transform: translateZ(0);
106 -o-transform: translateZ(0);
107 transform: translateZ(0);
108 -webkit-touch-callout: none;
109 -webkit-user-select: none;
110 -moz-user-select: none;
111 -ms-user-select: none;
112 user-select: none;
113 -webkit-text-size-adjust: none;
114 -moz-text-size-adjust: none;
115 -ms-text-size-adjust: none;
116 -o-text-size-adjust: none;
117 text-size-adjust: none;
118 }
119
120 #minimap {
121 position: absolute;
122 z-index: 1;
123 width: 235px;
124 height: 321px;
125 background: url(ermine.jpg);
126 background-size: 235px 321px;
127 top: 0px;
128 left: 245px;
129 }
130
131 #minimap-indicator {
132 position: absolute;
133 z-index: 1;
134 border: 1px solid #fe0;
135 box-shadow: 0 0 5px #000;
136 background: rgba(255,255,255,0.15);
137 -webkit-transform: translateZ(0);
138 -moz-transform: translateZ(0);
139 -ms-transform: translateZ(0);
140 -o-transform: translateZ(0);
141 transform: translateZ(0);
142 }
143
144 #bookmarks {
145 position: absolute;
146 left: 520px;
147 font-size: 1.4em;
148 }
149
150 #bookmarks li {
151 margin: 5px 0;
152 }
153
154 </style>
155 </head>
156 <body onload="loaded()">
157
158 <div id="wrapper">
159 <div id="scroller"></div>
160 </div>
161
162 <div id="minimap">
163 <div id="minimap-indicator"></div>
164 </div>
165
166 <ul id="bookmarks">
167 <li><a href="javascript:myScroll.scrollTo(-359, -85, 400, IScroll.utils.ease.back)">Face</a></li>
168 <li><a href="javascript:myScroll.scrollTo(-288, -342, 400, IScroll.utils.ease.back)">Necklace</a></li>
169 <li><a href="javascript:myScroll.scrollTo(-264, -658, 400, IScroll.utils.ease.back)">Hand</a></li>
170 <li><a href="javascript:myScroll.scrollTo(-383, -539, 400, IScroll.utils.ease.back)">Ermine</a></li>
171 </ul>
172
173 </body>
174 </html>