forked from konstantinos-tsatsarounos/rainyday.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
background-css.html
48 lines (46 loc) · 1.37 KB
/
background-css.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Rainy JS Demo</title>
<style media="screen">
body {
background-image: url(http://i.imgur.com/nH2ziAk.jpg);
background-size: cover;
}
#content {
position: absolute;
left: 100px;
top: 10%;
min-width: 60%;
min-height: 80%;
background-image: url(http://i.imgur.com/YcPWX2h.jpg);
background-size: cover;
}
</style>
<script src="rainyday.js"></script>
</head>
<body onload="demo();">
<div id="content">
</div>
<script>
function demo() {
var engine = new RainyDay({
blur: 3,
opacity: 1,
fps: 30
});
engine.trail = engine.TRAIL_SMUDGE;
engine.rain([ [0, 2, 1], [4, 4, 1] ], 100);
engine = new RainyDay({
element: "content",
blur: 10,
opacity: 1,
fps: 30
});
engine.trail = engine.TRAIL_SMUDGE;
engine.rain([ [0, 2, 1], [4, 4, 1] ], 100);
}
</script>
</body>
</html>