-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest002.html
More file actions
72 lines (64 loc) · 1.76 KB
/
test002.html
File metadata and controls
72 lines (64 loc) · 1.76 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.nav-container {
position: absolute;
background-color: #f3a483;
top: 0;
left: 0;
width: 100%;
justify-content: center;
display: flex;
}
.nav-container__inner {
display: flex;
justify-content: space-between;
max-width: 1080px;
margin: 0 auto;
/* 设置左右外边距为auto,使导航栏居中 */
padding: 0.625em 0;
/* 移除内边距 */
list-style: none;
/* 移除ul元素的默认样式 */
}
.top-nav {
display: flex;
list-style-type: none;
margin: 0;
}
.top-nav>li {
border-radius: 3px;
margin-left: 0.625em;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.501);
}
.top-nav a {
display: block;
padding: 0.3em 1.25em;
color: wheat;
background: #9b6f5b;
text-decoration: none;
border-radius: 3px;
font-family: 字魂扁桃体;
}
.top-nav a:hover {
background-color: #ffc596;
}
</style>
</head>
<body>
<nav class="nav-container">
<div class="nav-container__inner">
<ul class="top-nav">
<ul class="top-nav">
<li><a href="/">Home</a></li>
<li><a href="blogs.html">Blog</a></li>
<li><a href="links.html">Links</a></li>
<li><a href="about.html">About</a></li>
</ul>
</div>
</nav>
</body>
</html>