Skip to content

Commit

Permalink
Update custom.css
Browse files Browse the repository at this point in the history
  • Loading branch information
Lake233 authored Nov 15, 2024
1 parent 08633cc commit 9a9fde9
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,34 @@
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

button:hover + ul,
ul:hover {
display: block; /* 当鼠标悬停时显示下拉菜单 */
/* Dropdown menu styles */
.dropdown {
position: relative;
display: inline-block;
}

ul {
display: none; /* 默认隐藏 */
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
z-index: 1;
min-width: 150px;
}
ul li {
border-bottom: 1px solid #ddd; /* 为每个菜单项添加分隔线 */

.dropdown-content a {
color: black;
text-decoration: none;
display: block;
padding: 10px;
}
ul li:last-child {
border-bottom: none; /* 最后一项没有下边框 */

.dropdown-content a:hover {
background-color: #f1f1f1;
}
ul li a:hover {
background-color: #f1f1f1; /* 悬停时背景变色 */

.dropdown:hover .dropdown-content {
display: block; /* Show menu on hover */
}


Expand Down

0 comments on commit 9a9fde9

Please sign in to comment.