-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
94 lines (85 loc) · 1.89 KB
/
index.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
<html>
<head>
<title>PWA playground</title>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
font-family: sans-serif;
background-color: #e1e1e1;
color: #333;
}
h1 {
margin-bottom: 60px;
font-weight: normal;
}
.container {
width: 450px;
margin: 0 auto;
display: flex;
flex-direction: column;
text-align: center;
}
.animation {
position: relative;
left: 0;
width: 50px;
height: 50px;
background: rgb(247, 72, 41);
border-radius: 50%;
border: 2px solid #000;
animation: slide 2000ms cubic-bezier(0.645, 0.045, 0.355, 1) 0s infinite;
}
button {
width: 250px;
border: 1px solid #fff;
border-radius: 6px;
background-color: #333;
color: white;
text-transform: uppercase;
padding: 20px;
font-size: 20px;
margin: 100px auto 0;
cursor: pointer;
transition: opacity 300ms ease-out;
}
button:hover {
opacity: 0.8;
}
@keyframes slide {
25% {
transform: scale(2);
}
50% {
left: 400px;
transform: scale(1);
}
75% {
transform: scale(2);
}
}
@keyframes performantSlide {
50% {
transform: translateX(400px);
}
}
</style>
</head>
<body>
<div class="container">
<div>
<h1>
<div>Who's doing the work: </div>
<div>
<strong id="whos-doing-the-work">The Main thread</strong>
</div>
</h1>
</div>
<div class="animation"></div>
<button id="trigger-btn">Toggle work</button>
</div>
<script src="app.js"></script>
</body>
</html>