-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanimation_examples.html
49 lines (41 loc) · 1.23 KB
/
animation_examples.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
<!DOCTYPE html>
<html>
<head>
<title>Notification JS</title>
<link rel="shortcut icon" href="https://superzombi.github.io/Notification_JS/imgs/notification-logo.svg" type="image/svg+xml">
<link href="https://superzombi.github.io/Notification_JS/notifications.css" rel="stylesheet">
<script src="https://superzombi.github.io/Notification_JS/notifications.js"></script>
<style type="text/css">
#notifications{
position: absolute;
right: 2px;
bottom: 0;
width: 500px;
}
</style>
</head>
<body>
<div id="notifications"></div>
<script type="text/javascript">
async function sleep(ms){
await new Promise(resolve => setTimeout(resolve, ms));
}
window.onload = function(){
setTimeout(async function(){
notice = new Notifications('#notifications');
await notice.Warning("Default animation", 3000)
await sleep(500)
notice.animationIN("opacity") //<--
await notice.Warning("Only opacity", 3000)
await sleep(500)
notice.animationIN("scale") //<--
await notice.Warning("Only scale", 3000)
await sleep(500)
notice.animationIN("scale", "scale-right") //<--
await notice.Warning("Scale right", 3000)
await sleep(500)
}, 500)
}
</script>
</body>
</html>