-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdropmenu_03.html
More file actions
73 lines (65 loc) · 1.47 KB
/
dropmenu_03.html
File metadata and controls
73 lines (65 loc) · 1.47 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Drop Menu: Step 3</title>
<link rel="stylesheet" href="css/dropmenu.css">
<style type="text/css">
dl.drop-menu
{
position: absolute;
left: 50%;
margin-top: 30px;
margin-left: -80px;
z-index: 1;
}
dl.drop-menu dd
{
margin-top: -50px;
transition-property: margin-top;
transition-duration: 200ms;
transition-timing-function: ease-in;
}
dl.drop-menu:hover dd
{
margin-top: -1px;
transition-duration: 300ms;
transition-timing-function: ease-out;
}
</style>
</head>
<body>
<nav>
<dl class="drop-menu">
<dt>Days of the Week</dt>
<dd>Monday</dd>
<dd>Tuesday</dd>
<dd>Wednesday</dd>
<dd>Thursday</dd>
<dd>Friday</dd>
<dd>Saturday</dd>
<dd>Sunday</dd>
</dl>
</nav>
<section>
<p>A CSS Drop Menu.</p>
</section>
<script>
/* DROP-CSS
*
* 1. This works great except that the menu <dd> elements are stacked on top of the <dt> title.
* 2. This can be very easily resolved by introducing a z-index to force the <dt> to the top.
* 3. Add the following set of rules:
dl.drop-menu dt
{
position: relative;
z-index: 1;
}
* 4. The position rule is required for the z-index to take effect.
* 5. Any number can be used, but it's okay to stay small.
* 6. Are there other properties that could be transitioned? Try some.
*
*/
</script>
</body>
</html>