-
Notifications
You must be signed in to change notification settings - Fork 9
/
styles.css
75 lines (64 loc) · 1.12 KB
/
styles.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
/* control left margin */
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
-webkit-touch-callout: none;
-webkit-user-select: none;
font-smooth: never;
-webkit-font-smoothing : none;
}
body {
margin: 1vw;
background-color: hsl(302, 10%, 99%);
}
/* 16:9 */
#game {
width: 98vw; /* 100 - (body margin * 2) */
height: 54.25vw; /* 56.25 - (body margin * 2) */
position: relative;
background: black;
}
#game:after {
content:"";
position: absolute;
top: 0;
bottom: 0;
left: 50%;
border-left: 0.75vw dotted white;
}
.paddle {
position: absolute;
width: 1vw;
height: 5vw;
background: white; /* default color */
}
.ball {
position: absolute;
width: 1vw;
height: 1vw;
background: white;
/* default position to center court */
top: 50%;
left: 50%;
}
.blink {
animation: blink 0.5s steps(1, end) infinite;
}
@keyframes blink {
50% { opacity: 0.0; }
}
.score {
font-family: 'Small 5x3 Regular';
font-size: 8vw; /* not perfect, but close */
color: white;
position: absolute;
}
#a.score {
left: 40vw
}
#b.score {
left: 51.6vw;
}