-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoast.css
More file actions
38 lines (38 loc) · 937 Bytes
/
toast.css
File metadata and controls
38 lines (38 loc) · 937 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
.toast {
/* let it breathe */
padding: 15px 0px;
width: 200px;
font-family: sans-serif;
/* make the font super thin */
font-weight: 100;
/* give it a fixed position on the screen */
position: fixed;
top: 10px;
/* make it stick to the right side */
right: 0;
/* make the text color white */
color: white;
/* play the showToast animation */
animation-name: showToast;
/* make the animation last 5 seconds */
animation-duration: 5s;
/* give it a cool light shadow */
box-shadow: 3px 3px 3px #adadad;
}
.toast.good {background: #009600;}
.toast.bad {background: #aa0000;}
.toast.warn {background: #d4ac00;}
.toast > p {
margin: 0;
padding: 0px 10px;
}
/*
start our toast outside the frame, bring it in the frame,
and then take it back out
*/
@keyframes showToast {
0% {right: -250px}
25% {right: 0px}
50% {right: 0px}
100% {right: -250px}
}