-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrain.html
More file actions
55 lines (50 loc) · 739 Bytes
/
rain.html
File metadata and controls
55 lines (50 loc) · 739 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>Rain effect</title>
<style>
body{ background: url("back3.jpg");
background-size: cover;
background-repeat: no-repeat;
}
.rain{
background-image: url("rain.png");
height: 100vh;
animation: rain .3s linear infinite;
}
.rain:before{position: absolute;
width: 100%;
height: 100%;
content: '';
background-color: white;
opacity: 0;
animation: light .1s linear infinite;
}
@keyframes rain{
0%,100%{
background-position: 0% 0%;
}
50%{
background-position: 100% 0%;
}
}
@keyframes light{
0%{
opacity:0;
}
50%{
opacity: 0;
}
53%{
opacity:0.8;
}
55%{
opacity: 0;
}
}
</style>
</head>
<body>
<div class="rain"></div>
</body>
</html>