-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
135 lines (122 loc) · 2.32 KB
/
style.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
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
@font-face {
font-family: "Sansita";
src: url("/assets/fonts/SansitaSwashed-VariableFont.woff") format("woff");
src: url("/assets/fonts/SansitaSwashed-VariableFont.woff2") format("woff2");
}
@font-face {
font-family: "Creepster";
src: url("/assets/fonts/Creepster-Regular.woff") format("woff");
src: url("/assets/fonts/Creepster-Regular.woff2") format("woff2");
}
:root {
--blue: cornflowerblue;
--green: rgb(179, 233, 179);
--red: red;
--text: "Sansita";
--text2: "Creepster";
--titleText: rgb(112, 123, 85);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
height: 100vh;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: var(--green);
}
h1 {
position: absolute;
color: var(--blue);
z-index: 1;
top: 100px;
font-family: var(--text);
font-size: 4em;
}
p {
padding: 20px;
position: absolute;
bottom: 50px;
font-family: var(--text2);
font-size: 3em;
color: var(--red);
text-align: center;
}
button {
background-image: url("assets/images/smileyface.jpg");
height: 200px;
width: 200px;
border-radius: 50%;
border: 0;
margin: 20px;
filter: drop-shadow(5px 5px 7px rgb(65, 65, 65));
}
button:focus {
outline: 0;
}
.buttons {
flex-direction: row;
justify-content: center;
align-items: center;
position: absolute;
}
@media (max-width: 745px) {
body {
overflow: hidden;
position: relative;
width: 100%;
height: 100vh;
}
.buttons {
display: flex;
flex-direction: column;
}
button {
height: 130px;
width: 130px;
margin: 10px;
background-image: url("assets/images/smileyfacesmall.jpg");
}
h1 {
top: 40px;
font-size: 2em;
}
p {
padding: 20px;
bottom: 10px;
font-size: 1.2em;
}
}
@keyframes shake {
0% {
transform: translate(2px, 1px) rotate(0deg);
}
20% {
transform: translate(-1px, -2px) rotate(-1deg);
}
40% {
transform: translate(-3px, 0px) rotate(1deg);
}
60% {
transform: translate(0px, 2px) rotate(0deg);
}
80% {
transform: translate(1px, -1px) rotate(1deg);
}
100% {
transform: translate(-1px, 2px) rotate(-1deg);
}
}
.shake:hover {
animation-name: shake;
animation-duration: 0.3s;
transform-origin: 50% 50%;
animation-iteration-count: infinite;
}
.shake {
display: inline-block;
}