-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
131 lines (127 loc) · 4.22 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
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
<!doctype html>
<html>
<head>
<title>
Take a deep Breath
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width; height=device-height; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
overflow: hidden;
background: #fff;
opacity: 1;
animation: start 12s 1;
}
@keyframes start {
from {opacity: 0}
to {opacity: 1}
}
#overlay {
position: fixed;
width: 100%;
height: 100%;
z-index: 1;
box-shadow: inset 0 0 25px 0 #000;
animation: overlaybreath 12s infinite;
}
@keyframes overlaybreath {
0% {}
58% {
box-shadow: inset 0 0 0 0 #666;
}
100% {}
}
#bg {
width: 100%;
height: auto;
animation: bgbreath 12s infinite;
}
@keyframes bgbreath {
0% {opacity: 1}
58% {opacity: 0.9; transform: scale(1.01,1.01)}
100% {opacity: 1}
}
#inner-circle {
width: 0;
height: 0;
border: 1px solid #fff;
border-radius: 1px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -0.5px;
margin-left: -0.5px;
opacity: 0.2;
animation: innercirclebreath 12s infinite;
}
@keyframes innercirclebreath {
0% {}
58% {
width: 200px;
height: 200px;
border: 2px solid #fff;
border-radius: 100px;
margin-top: -101px;
margin-left: -101px;
opacity: 1;
}
100% {}
}
#outer-circle {
width: 200px;
height: 200px;
border: 2px solid #fff;
border-radius: 100px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -101px;
margin-left: -101px;
box-shadow: inset 0 0 0 0 #fff, 0 0 0 0 #fff;
animation: outercirclebreath 12s infinite;
}
@keyframes outercirclebreath {
0% {}
58% {
box-shadow: inset 0 0 10px 0 #fff, 0 0 10px 0 #fff;
}
100% {}
}
</style>
</head>
<body>
<div id="overlay">
</div>
<img id="bg" src="bg.jpg">
<div id="inner-circle">
</div>
<div id="outer-circle">
</div>
<script>
(function() {
var bg = document.getElementById("bg");
window.addEventListener("resize", function(){
bgResize(bg);
});
bgResize(bg);
function bgResize(bg) {
if(window.innerHeight/window.innerWidth > 1080/1920) {
bg.style.height = window.innerHeight + "px";
bg.style.width = "auto";
bg.style.marginTop = "0px";
bg.style.marginLeft = "-" + ((bg.width - window.innerWidth)/2) + "px";
} else {
bg.style.height = "auto";
bg.style.width = "100%";
bg.style.marginLeft = "0px";
bg.style.marginTop = "-" + ((bg.height - window.innerHeight)/2) + "px";
}
}
}());
</script>
</body>
</html>