-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
69 lines (69 loc) · 1.48 KB
/
index.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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="style/css/global.css">
<style type="text/css">
.clear {clear: both;}
.clearfix:after {clear:both; content:'';display: block;font-size: 0;line-height: 0;visibility: hidden; width: 0;height: 0;}
.clearfix {+display: inline-block;}
#nav{margin:0 auto;width:auto;color: #fff;}
#nav div{float: left;overflow: hidden;border-bottom:none;}
#nav h3,li{padding:10px 30px;cursor: pointer;background: #39A4DC;}
#nav div:hover>h3,li{background: #ccc;}
#nav li:hover{background: #bbb;}
</style>
</head>
<body>
<div class="clearfix" id="nav">
<div>
<h3>首页</h3>
<ul></ul>
</div>
<div>
<h3>新闻</h3>
<ul>
<li>新闻1</li>
<li>新闻2</li>
<li>新闻3</li>
</ul>
</div>
<div>
<h3>娱乐</h3>
<ul>
<li>娱乐1</li>
<li>娱乐2</li>
<li>娱乐3</li>
<li>娱乐4</li>
</ul>
</div>
<div>
<h3>体育</h3>
<ul>
<li>体育1</li>
<li>体育2</li>
<li>体育3</li>
<li>体育4</li>
<li>体育5</li>
</ul>
</div>
<div>
<h3>游戏</h3>
<ul>
<li>游戏1</li>
<li>游戏2</li>
<li>游戏3</li>
<li>游戏4</li>
<li>游戏5</li>
<li>游戏6</li>
</ul>
</div>
</div>
<script src="style/js/index.js" type="text/javascript"></script>
<script type="text/javascript">
for (var i = 0; i < 5; i++) {
new Nav("nav", i);
}
</script></body>
</html>