-
Notifications
You must be signed in to change notification settings - Fork 96
/
menu.html
152 lines (133 loc) · 3.68 KB
/
menu.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Menu</title>
<style>
/* 表现样式 */
.multi_drop_menu {
font: 1em helvetica, arial, sans-serif;
}
.multi_drop_menu a {
display: block;
color: #555;
background-color: #eee;
padding: .2em 1em;
border-width: 3px;
border-color: transparent;
}
.multi_drop_menu a:hover {
color: #fff;
background-color: #aaa;
}
.multi_drop_menu a:active {
background: #fff;
color: #ccc;
}
.multi_drop_menu li ul {
width: 9em;
}
.multi_drop_menu li li a {
border-right-style: none;
border-top-style: solid;
}
/* 功能样式 */
.multi_drop_menu * {
margin: 0;
padding: 0;
}
.multi_drop_menu ul {
float: left;
}
.multi_drop_menu li {
float: left;
list-style-type: none;
position: relative;
}
.multi_drop_menu li a {
display: block;
border-right-style: solid;
background-clip: padding-box;
text-decoration: none;
}
.multi_drop_menu li:hover>ul {
display: block;
}
.multi_drop_menu li:hover>a {
color: #fff;
background-color: #aaa;
}
.multi_drop_menu li:last-child a {
border-right-style: none;
}
.multi_drop_menu li ul {
display: none;
position: absolute;
left: 0;
top: 100%;
}
.multi_drop_menu li li {
float: none;
}
.multi_drop_menu li li ul {
position: absolute;
left: 100%;
top: 0;
}
</style>
</head>
<body>
<nav class=" multi_drop_menu">
<!--一级 开始 -->
<ul>
<li>
<a href="#"> Power</a>
</li>
<li>
<a href="#"> Money</a>
</li>
<li>
<a href="#"> Love</a>
</li>
<li>
<a href="#"> Fame</a>
<!--二级 开始 -->
<ul>
<li>
<a href="#"> Sports Star</a>
</li>
<li>
<a href="#"> Movie Star</a>
</li>
<li>
<a href="#"> Rock Star</a>
<!--三级 开始 -->
<ul>
<li>
<a href="#"> Bruce Springsteen</a>
</li>
<li>
<a href="#"> Bono</a>
</li>
<li>
<a href="#"> Mick Jagger</a>
</li>
<li>
<a href="#"> Bob Dylan</a>
</li>
</ul>
<!--三级 结束 -->
</li>
<li>
<a href="#"> Web Designer</a>
</li>
</ul>
<!--二级 结束 -->
</li>
</ul>
<!--一级 结束 -->
</nav>
</body>
</html>