-
Notifications
You must be signed in to change notification settings - Fork 0
/
clock.html
107 lines (80 loc) · 2.47 KB
/
clock.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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<style type="text/css">
body{
font:bold 7px Arial, Helvetica, sans-serif;
margin:0;
padding:0;
min-width:960px;
color:#bbbbbb;
}
@font-face {
font-family: 'BebasNeueRegular';
src: url('js/BebasNeue-webfont.eot');
src: url('js/BebasNeue-webfont.eot?#iefix') format('embedded-opentype'),
url('js/BebasNeue-webfont.woff') format('woff'),
url('js/BebasNeue-webfont.ttf') format('truetype'),
url('js/BebasNeue-webfont.svg#BebasNeueRegular') format('svg');
font-weight: normal;
font-style: normal;
}
.container {width: 100%; overflow: hidden;}
.clock {width:100%; color:#fff; }
#Date { font-family: Helvetica, sans-serif; font-size:16px; }
ul { width:800px; padding:0px; list-style:none;}
ul li { display:inline; font-size:3em; font-family:'BebasNeueRegular', Arial, Helvetica, sans-serif;padding-left: 2px; }
#point { position:relative; -moz-animation:mymove 1s ease infinite; -webkit-animation:mymove 1s ease infinite; padding-right:5px; padding-left: 5px;}
@-webkit-keyframes mymove
{
0% {opacity:1.0; }
50% {opacity:0; }
100% {opacity:1.0; }
}
@-moz-keyframes mymove
{
0% {opacity:1.0;}
50% {opacity:0; }
100% {opacity:1.0; }
}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ];
var newDate = new Date();
newDate.setDate(newDate.getDate());
$('#Date').html(newDate.getDate() + ' ' + monthNames[newDate.getMonth()] + ' ' + newDate.getFullYear());
setInterval( function() {
var seconds = new Date().getSeconds();
$("#sec").html(( seconds < 10 ? "0" : "" ) + seconds);
},1000);
setInterval( function() {
var minutes = new Date().getMinutes();
// Add a leading zero to the minutes value
$("#min").html(( minutes < 10 ? "0" : "" ) + minutes);
},1000);
setInterval( function() {
var hours = new Date().getHours();
$("#hours").html(( hours < 10 ? "0" : "" ) + hours);
}, 1000);
});
</script>
</head>
<body>
<div class="container">
<div class="clock">
<div id="Date"></div>
<ul>
<li id="hours"> </li>
<li id="point">:</li>
<li id="min"> </li>
<li id="point">:</li>
<li id="sec"> </li>
</ul>
</div>
</div>
</body>
</html>