-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathu_ex1.html
60 lines (50 loc) · 1.01 KB
/
u_ex1.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
<!doctype html>
<meta charset="utf-8" />
<title>Example</title>
<script>COMPILED=false</script>
<script src=uilang.js></script>
<style>
/* Font styles, colors, etc. omitted for clarity */
#notification {
transition: .8s
}
#notification.hidden {
opacity: 0
}
:not(button) {
margin: 0;
padding: 0;
}
#notification {
position: relative;
width: 410px;
margin: 120px auto 0;
padding: 14px 0;
border: 1px solid #FFED8D;
border-bottom-color: #F5DC7A;
border-radius: 4px;
box-shadow: 0 1px 2px rgba(125,112,33,.23);
background: #FFFADA;
transition: opacity .8s;
}
#notification.hidden {
opacity: 0;
}
#notification p {
font: 500 13px "helvetica neue", helvetica, arial, sans-serif;
text-align: center;
color: #1A3547;
}
#notification button {
position: absolute;
right: 11px;
top: 11px;
}
</style>
<div id=notification>
<p>You have 3 unread messages.</p>
<button class=hide>Hide</button>
</div>
<code>
clicking on ".hide" adds class "hidden" on "#notification"
</code>