-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
80 lines (78 loc) · 2 KB
/
test.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
<!DOCTYPE html>
<html>
<style>
a {
display: block;
float: left;
position: relative;
height: 25px;
width: 140px;
margin: 0 10px 18px 0;
text-decoration: none;
font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: bold;
line-height: 25px;
text-align: center;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
a:before, a:after {
content: '';
position: absolute;
left: -1px;
height: 25px;
width: 140px;
bottom: -1px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
a:before {
height: 23px;
bottom: -4px;
border-top: 0;
-webkit-border-radius: 0 0 3px 3px;
-moz-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
-webkit-box-shadow: 0 1px 1px 0px #bfbfbf;
-moz-box-shadow: 0 1px 1px 0px #bfbfbf;
box-shadow: 0 1px 1px 0px #bfbfbf;
}
/* GRAY */
a, a:hover, a:visited {
color: #555;
border-bottom: 4px solid #b2b1b1;
text-shadow: 0px 1px 0px #fafafa;
background: #eee;
background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#e2e2e2));
background: -moz-linear-gradient(top, #eee, #e2e2e2);
box-shadow: inset 1px 1px 0 #f5f5f5;
}
a:before, a:after {
border: 1px solid #cbcbcb;
border-bottom: 1px solid #a5a5a5;
}
a:hover {
background: #e2e2e2;
background: -webkit-gradient(linear, left top, left bottom, from(#e2e2e2), to(#eee));
background: -moz-linear-gradient(top, #e2e2e2, #eee);
}
</style>
<head>
<meta charset="utf-8">
<script type="text/javascript">
function test() {
var x = 0;
var Time1 = new Date();
for (var i = 1; i < 1000000000; i++) { x += i; }
var Time2 = new Date();
var diff = Time2.getTime() - Time1.getTime();
window.alert("结果为:" + x + "\n用时:" + diff);
}
</script>
</head>
<body>
<a onclick="test()">1000000000轮循环</a>
</body>
</html>