-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtraffic_light.css
96 lines (81 loc) · 1.21 KB
/
traffic_light.css
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
* {
box-sizing: border-box;
}
body,
html {
margin: 0;
padding: 0;
}
.outer {
width: 20%;
margin: 0;
border: 1px solid #000;
padding: 2.5vw;
z-index: 200;
border-radius: 5px;
}
.inner {
background-color: #000;
padding: 2.5vw;
border-radius: 5px;
}
.light {
background-color: #ccc;
width: 10vw;
height: 10vw;
margin-bottom: 10px;
border-radius: 50%;
}
.light:last-child {
margin-bottom: 0;
}
.stop.on {
background-color: #f00;
}
.caution.on {
background-color: #ff0;
}
.go.on {
background-color: #0f0;
}
.container {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
height: 100vh;
}
header {
width: 100%;
background-color: #eee;
padding: 15px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
footer {
width: 100%;
background-color: #eee;
padding: 15px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
footer button,
header button {
background-color: #eee;
padding: 15px;
border-radius: 5px;
margin-inline-end: 5px;
}
button#stop {
background-color: red;
color: white;
}
button#caution {
background-color: yellow;
}
button#go {
background-color: green;
color: white;
}