-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
295 lines (275 loc) · 14.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>前端学习总结</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel = "stylesheet" type = "text/css" href = "css/demo.css">
<link rel = "stylesheet" type = "text/css" href = "css/reset.css">
</head>
<body>
<div id = "list">
<div id = "mulu">
<h2>
<a href = "">前端学习总结</a>
</h2>
<ul class = "hidemulu">
<li class = "a1">
<div class=tx><a href="#"><i> </i>表单验证</a> </div>
<div class = "center">
<dl class = "fore1">
<dt><p class = "demo"><a href = "biaodan/1/index.html" target="_blank">用户是否输入</a></dt></p>
</dl>
<dl class = "fore2">
<dt><p class = "demo"><a href = "biaodan/2/index.html" target="_blank">禁止输入</a></dt></p>
</dl>
<dl class = "fore4">
<dt><p class = "demo"><a href = "biaodan/3/index.html" target="_blank">下拉菜单</a></dt></p>
</dl>
<dl class = "fore5">
<dt><p class = "demo"><a href = "biaodan/4/index.html" target="_blank">全选项</a></dt></p>
</dl>
<dl class = "fore5">
<dt><p class = "demo"><a href = "biaodan/5/index.html" target="_blank">表单验证</a></dt></p>
</dl>
<dl class = "fore5">
<dt><p class = "demo"><a href = "biaodan/6/register.html" target="_blank">注册验证</a></dt></p>
</dl>
<dl class = "fore5">
<dt><p class = "demo"><a href = "biaodan/7/forgetpwd.html" target="_blank">忘记密码</a></dt></p>
</dl>
<dl class = "fore5">
<dt><p class = "demo"><a href = "biaodan/8/time.html" target="_blank">显示当前时间</a></dt></p>
</dl>
<div class = "alr">
<img src = "images/20150518092317.jpg">
</div>
</div>
</li>
<li class = "a2">
<div class=tx><a href="#"><i> </i>图片轮换</a> </div>
<div class = "center">
<dl class = "fore1">
<dt><p class = "demo"><a href = "slider/slider.html" target="_blank">图片切换</a></dt></p>
</dl>
<dl class = "fore2">
<dt><p class = "demo"><a href = "slider/1/index.html" target="_blank">旋转切换</a></dt></p>
</dl>
<dl class = "fore3">
<dt><p class = "demo"><a href = "slider/2/index.html" target="_blank">多图切换</a></dt></p>
</dl>
<dl class = "fore4">
<dt><p class = "demo"><a href = "slider/3/index.html" target="_blank">标题栏切换</a></dt></p>
</dl>
<dl class = "fore7">
<div class = "alr">
<img src = "images/20150518092236.jpg">
</div>
</div>
</li>
<li class = "a3">
<!--<div class=tx><a href="#"><i> </i>ajax探讨</a> </div>-->
<div class = "center">
<dl class = "fore1">
</dl>
<dl class = "fore2">
</dl>
<dl class = "fore3">
</dl>
<dl class = "fore4">
</dl>
<div class = "alr">
<img src = "images/20150518092152.jpg">
</div>
</div>
</li>
<li class = "a3">
<div class=tx><a href="#"><i> </i>前端效果</a> </div>
<div class = "center">
<dl class = "fore1">
<dt><p class = "demo"><a href = "xiaoguo/1/index.html" target="_blank">全日历</a></dt></p>
</dl>
<dl class = "fore2">
<dt><p class = "demo"><a href = "xiaoguo/2/index.html" target="_blank">简易时钟</a></dt></p>
</dl>
<!-- <dl class = "fore3">
<dl class = "fore1">
<dt><p class = "demo"><a href = "xiaoguo/3/index2.html" target="_blank">皮肤切换</a></dt></p>
</dl>
</dl>-->
<dl class = "fore4">
<dl class = "fore1">
<dt><p class = "demo"><a href = "xiaoguo/4/index.html" target="_blank">页面滑动</a></dt></p>
</dl>
<dl class = "fore5">
<dl class = "fore1">
<dt><p class = "demo"><a href = "xiaoguo/5/index.html" target="_blank">分页效果(附带模拟数据)</a></dt></p>
</dl>
<dl class = "fore6">
<dl class = "fore1">
<dt><p class = "demo"><a href = "xiaoguo/6/index.html" target="_blank">点击图片放大效果</a></dt></p>
</dl>
<dl class = "fore7">
<dl class = "fore1">
<dt><p class = "demo"><a href = "xiaoguo/7/layerout.html" target="_blank">弹出层</a></dt></p>
</dl>
<dl class = "fore7">
<dl class = "fore1">
<dt><p class = "demo"><a href = "xiaoguo/8/index.html" target="_blank">图片文字滚动集合</a></dt></p>
</dl>
<dl class = "fore7">
<dl class = "fore1">
<dt><p class = "demo">
<a href = "xiaoguo/9/demoToggle.html" target="_blank">
tab多级切换
</a></dt></p>
</dl>
<div class = "alr">
<img src = "images/20150518092152.jpg">
</div>
</div>
</li>
<li class = "a4">
<div class=tx><a href="#"><i> </i>内容展示</a> </div>
<div class = "center">
<dl class = "fore1">
<dt><p class = "demo"><a href= "content/jd/index.html" target="_blank">电商首页示例</a></p></dt>
</dl>
<dl class = "fore2">
<dt><p class = "demo"><a href= "content/1/index.html" target="_blank">响应式网页-responsive</a></p></dt>
</dl>
<dl class = "fore3">
<dt><p class = "demo"><a href= "content/2/index.html" target="_blank">响应式网页-云端office</a></p></dt>
</dl>
<dl class = "fore4">
<dt><p class = "demo"><a href= "content/3/index.html" target="_blank">响应式网页-蓝光</a></p></dt>
</dl>
<!--<dl class = "fore5">
<dt><p class = "demo"><a href= "content/4/index.html" target="_blank">响应式网页demo</a></p></dt>
</dl>-->
<dl class = "fore6">
<dt><p class = "demo"><a href= "content/5/index.html" target="_blank">响应式网页-app简介</a></p></dt>
</dl>
<dl class = "fore7">
<dt><p class = "demo"><a href= "content/7/index.html" target="_blank">响应式网页-特效</a></p></dt>
</dl>
<dl class = "fore8">
<dt><p class = "demo"><a href= "content/app/1/index.html" target="_blank">移动端rem布局</a></p></dt>
</dl>
<dl class = "fore9">
<dt><p class = "demo"><a href= "content/app/2/index.html" target="_blank">移动端flexbox布局</a></p></dt>
</dl>
<div class = "alr">
<img src = "images/20150518092236.jpg">
</div>
</div>
</li>
<li class = "a3">
<div class=tx><a href="#"><i> </i>其他</a> </div>
<div class = "center">
<dl class = "fore1">
<dt><p class = "demo"><a href= "aother/1/api.html" target="_blank">百度api</a></p></dt>
</dl>
<dl class = "fore2">
<dt><p class = "demo"><a href= "aother/2/index.html" target="_blank">animate</a></p></dt>
</dl>
<dl class = "fore3">
</dl>
<dl class = "fore4">
</dl>
<div class = "alr">
<img src = "images/20150518092152.jpg">
</div>
</div>
</li>
</ul>
</div>
</div>
<script type="text/javascript">
window.onload = function(){
var isOpen = false;//雪花启动的开关
function flutterChar(){
if(isOpen){//是否开启过
return;
}
isOpen = true;
var allChar = [],//创建文字
maxSnowflake = 90, //雪花的最大数目
maxleft = (document.body.clientWidth || document.documentElement.clientWidth)-100, //最大的left值
maxTop = -1,//最高高度
i = 0,//遍历计数器
snowflake = [//雪花类型
'❉',
'❈',
'*',
'✲',
'❀',
'❃'
],
snowflakeColor = [ //颜色库
"red",
"green",
"#ccc123",
"#345232",
"#231111",
"#ab2322"
],
s = 0, //计数雪花---类型与颜色
createCharr = function(){//创建雪花
var d = document.createElement("div");
s++;//修改颜色与雪花值
s = s > 5 ? 0 : s;
d.innerHTML = snowflake[s];//填充值
d.style.left = Math.round(Math.random()*maxleft+0) + "px";//设置雪花的left值
d.style.top = (-1 * Math.round(Math.random()*100+0)) + "px";//设置雪花的top值
d.style.position = "absolute";//绝对定位
d.style.zIndex = "999";//Z轴设置
d.style.color = snowflakeColor[s]; //设置颜色
d.setAttribute("data-v", Math.round(Math.random()*5+2));//随机雪花速度
d.setAttribute("data-time", "0");//雪花的漂浮时间
document.body.appendChild(d);
return d;//返回雪花对象
},
moveChar = function(e){//移动雪花
maxTop = document.body.scrollHeight-50;
var l = parseInt(e.style.left, 10),
t = parseInt(e.style.top, 10),
v = parseInt(e.getAttribute("data-v"), 10),//当时速度
time = parseInt(e.getAttribute("data-time"), 10), //时间 ]
_time = time + 50,
_l = l + v,
_t = 0.5 * 9 * _time * _time * 0.001 * 0.001 * v,//落体位移的路程,加入修正值v
top = _t >= maxTop ? 0 : _t,
_time = _t >= maxTop ? 0 : _time;
e.style.top = top + "px";
e.style.left = ( _l >= maxleft ? 0 : _l) + "px";
e.setAttribute("data-time", _time);
};
var createS = setInterval(function(){//雪花运动
//创建很多雪花
var length = allChar.length,
l = length + 10;
for(; i < l ; i++){
allChar.push(createCharr());
}
if(allChar.length > maxSnowflake){
clearInterval(createS);
}
}, 1000)
setInterval(function(){//雪花运动
var ll = allChar.length;
for(i = 0 ; i < ll ; i++){
moveChar(allChar[i]);
}
}, 50)
}
/*
<input id='startFlutterCharacter'value="开始" type="button"/>
document.getElementById("startFlutterCharacter").onclick = function(){//页面五颜六色的雪花
this.value = "已开始下雪,请等待";*/
flutterChar();
//}
};
</script>
</body>
</html>