Files
hsa/Html/apps/static/css/navbar.css
2025-10-27 11:20:07 +08:00

76 lines
1.4 KiB
CSS

/* 页眉导航栏 */
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #2575fc;
color: rgb(235, 235, 235);
border-radius: 10px;
margin-bottom: 30px;
}
.navbar .logo h1 {
color: rgb(245, 245, 245);
font-size: 24px;
font-weight: bold;
}
.navbar-links a {
color: rgb(235, 235, 235);
text-decoration: none;
margin: 0 15px;
font-size: 18px;
transition: color 0.3s;
}
.navbar-links a:hover {
color: #f1c40f;
}
.navbar .avatar img {
width: 40px;
height: 40px;
border-radius: 50%;
border: 2px solid white;
}
/* 下拉浮框 基础定位 */
.dropdown {
position: relative;
display: inline-block;
}
/* 下拉浮框 内容样式(默认隐藏) */
.dropdown-content {
display: none;
position: absolute;
right: 0;
background-color: white;
min-width: 160px;
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
border-radius: 6px;
z-index: 1;
padding: 8px 0;
font-size: 14px;
}
/* 下拉浮框 链接样式 */
.dropdown-content a {
color: #4b5563;
text-decoration: none;
padding: 8px 12px;
display: block;
transition: background-color 0.3s;
}
.dropdown-content a:hover {
background-color: #f3f4f6;
}
/* 下拉浮框 hover 显示 */
.dropdown:hover .dropdown-content {
display: block;
}