-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstep-04.html
142 lines (123 loc) · 3.52 KB
/
step-04.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
<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: 50%;
width: 1%;
position: absolute;
background: darkblue;
left: 49.5%;
top: 0px;
transform-origin: center 100%;
}
.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); }
.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"></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-03.html">« prev</a>
<a href="step-05.html">next »</a>
</div>
</div>
</body>
</html>