-
Notifications
You must be signed in to change notification settings - Fork 0
/
step-08.html
183 lines (161 loc) · 5.06 KB
/
step-08.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
<html>
<head>
<title>CSS Stopwatch Example</title>
<style>
* {
box-sizing: border-box;
margin: 0px;
padding: 0px;
}
body {
margin: 0px;
color: darkblue;
background: darkslategrey;
}
h1 {
font-family: Calibri;
font-size: 36px;
text-align: center;
color: powderblue;
margin-top: 32px;
}
input[type="radio"] {
opacity: 0.001;
position: absolute;
}
.container {
position: relative;
margin: 2% auto;
font-family: Calibri;
font-size: 20px;
width: 400px;
height: 400px;
}
.clock {
background: powderblue;
border-color: darkblue;
border-width: 2px;
border-style: solid;
border-radius: 50%;
width: 100%;
height: 100%;
}
.segment {
height: 100%;
position: absolute;
padding-top: 4%;
width: 2em;
left: calc(50% - 1em);
text-align: center;
top: 0px;
}
.numeral {
width: 2em;
text-align: center;
}
.major {
height: 3%;
width: 1%;
position: absolute;
background: darkblue;
left: 49.5%;
top: 0px;
transform-origin: center calc(5000% / 3);
}
.minor {
height: 2%;
width: 0.5%;
position: absolute;
background: darkblue;
left: 49.75%;
top: 0px;
transform-origin: center calc(5000% / 2);
}
.one { transform: rotate(30deg); }
.two { transform: rotate(60deg); }
.three { transform: rotate(90deg); }
.four { transform: rotate(120deg); }
.five { transform: rotate(150deg); }
.six { transform: rotate(180deg); }
.seven { transform: rotate(210deg); }
.eight { transform: rotate(240deg); }
.nine { transform: rotate(270deg); }
.ten { transform: rotate(300deg); }
.eleven { transform: rotate(330deg); }
.one > .numeral { transform: rotate(-30deg); }
.two > .numeral { transform: rotate(-60deg); }
.three > .numeral { transform: rotate(-90deg); }
.four > .numeral { transform: rotate(-120deg); }
.five > .numeral { transform: rotate(-150deg); }
.six > .numeral { transform: rotate(-180deg); }
.seven > .numeral { transform: rotate(-210deg); }
.eight > .numeral { transform: rotate(-240deg); }
.nine > .numeral { transform: rotate(-270deg); }
.ten > .numeral { transform: rotate(-300deg); }
.eleven > .numeral { transform: rotate(-330deg); }
.minor-one { transform: rotate(3deg); }
.minor-two { transform: rotate(6deg); }
.minor-three { transform: rotate(9deg); }
.minor-four { transform: rotate(12deg); }
.minor-five { transform: rotate(15deg); }
.minor-six { transform: rotate(18deg); }
.minor-seven { transform: rotate(21deg); }
.minor-eight { transform: rotate(24deg); }
.minor-nine { transform: rotate(27deg); }
.nav a {
color: powderblue;
text-decoration: none;
}
.nav a:last-child {
float: right;
}
.nav a:hover {
color: white;
}
</style>
</head>
<body>
<h1>CSS Stopwatch Example</h1>
<div class="container">
<div class="clock">
<div class="major twelve"></div>
<div class="major one"></div>
<div class="major two"></div>
<div class="major three"></div>
<div class="major four"></div>
<div class="major five"></div>
<div class="major six"></div>
<div class="major seven"></div>
<div class="major eight"></div>
<div class="major nine"></div>
<div class="major ten"></div>
<div class="major eleven"></div>
<div class="minor minor-one"></div>
<div class="minor minor-two"></div>
<div class="minor minor-three"></div>
<div class="minor minor-four"></div>
<div class="minor minor-five"></div>
<div class="minor minor-six"></div>
<div class="minor minor-seven"></div>
<div class="minor minor-eight"></div>
<div class="minor minor-nine"></div>
<div class="segment twelve"> <div class="numeral"> 0</div></div>
<div class="segment one"> <div class="numeral"> 5</div></div>
<div class="segment two"> <div class="numeral">10</div></div>
<div class="segment three"> <div class="numeral">15</div></div>
<div class="segment four"> <div class="numeral">20</div></div>
<div class="segment five"> <div class="numeral">25</div></div>
<div class="segment six"> <div class="numeral">30</div></div>
<div class="segment seven"> <div class="numeral">35</div></div>
<div class="segment eight"> <div class="numeral">40</div></div>
<div class="segment nine"> <div class="numeral">45</div></div>
<div class="segment ten"> <div class="numeral">50</div></div>
<div class="segment eleven"> <div class="numeral">55</div></div>
</div>
<div class="nav">
<a href="step-07.html">« prev</a>
<a href="step-09.html">next »</a>
</div>
</div>
</body>
</html>