-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavbar.css
57 lines (49 loc) · 1004 Bytes
/
navbar.css
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
/* Navigation styles */
nav {
/*background-color: rgba(0, 0, 0, 0.5); !* 默认背景色为半透明黑色 *!*/
color: #fff; /* 导航栏字体颜色为白色 */
display: flex;
justify-content: space-between;
align-items: center;
height: 80px;
padding: 0 50px;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 100;
transition: background-color 0.3s ease-in-out; /* 添加背景色渐变过渡动画 */
}
.logo-title {
display: flex;
align-items: center;
}
.logo-title img {
height: 50px;
margin-right: 10px;
}
.logo-title h1 {
font-size: 24px;
font-weight: bold;
}
nav ul {
display: flex;
list-style: none;
}
nav ul li {
margin-right: 30px;
}
nav ul li:last-child {
margin-right: 0;
}
nav ul li a {
color: #fff;
text-decoration: none;
font-size: 16px;
font-weight: bold;
text-transform: uppercase;
transition: all 0.2s ease-in-out;
}
nav ul li a:hover {
color: #999;
}