This commit is contained in:
2026-02-08 19:03:16 +08:00
parent 1757d89c68
commit 6361ba484c
3 changed files with 107 additions and 73 deletions

View File

@@ -1,3 +1,65 @@
#nav-right{
flex:1 1 auto;
justify-content: flex-end;
margin-left: auto;
display: flex;
flex-wrap:nowrap;
}
/* 导航栏居中 */
#sidebar #sidebar-menus .menus_items .menus_item {
margin: 10px 0;
}
#sidebar #sidebar-menus .menus_items a.site-page {
padding-left: 0;
}
#sidebar #sidebar-menus .menus_items .site-page {
position: relative;
display: block;
padding: 6px 30px 6px 22px;
color: var(--font-color);
font-size: 1.15em;
border: var(--style-border-always);
background: var(--icat-card-bg);
font-size: 14px;
border-radius: 12px;
}
#sidebar #sidebar-menus .menus_items .site-page i:first-child {
text-align: left;
padding-left: 10px;
}
#nav #menus {
display: flex;
justify-content: center;
width: 100%;
position: absolute;
left: 0;
margin: 0;
transform: translateZ(0);
}
#nav #blog-info {
flex-wrap: nowrap;
display: flex;
align-items: center;
z-index: 102;
max-width: fit-content;
}
@media screen and (max-width: 900px) {
#nav {
padding: 0 15px;
}
#nav-group {
padding: 0 0.2rem;
}
#rightside {
right: -42px;
}
}
/* IPAD菜单栏调整 */
/* 1. 容器溢出穿透 */
#nav, #blog-info, #nav-group {
overflow: visible !important;
@@ -112,4 +174,38 @@
[data-theme='dark'] .ls-grid a {
color: #ccc !important;
background: rgba(255, 255, 255, 0.05);
}
/* --- 附加补丁:确保文章标题正常显示且居中 --- */
/* 1. 当文章标题显示类名触发时,确保它能浮现 */
#nav.show-title .nav-page-title {
display: flex !important;
opacity: 1 !important;
visibility: visible !important;
/* 强制居中,不影响你原本的 blog-info 和 nav-right */
position: absolute !important;
left: 50% !important;
transform: translateX(-50%) !important;
white-space: nowrap !important;
z-index: 1000 !important; /* 确保层级高于你原本的 menus */
}
/* 2. 滚动时自动隐藏原本占据 100% 宽度的菜单和站点标题,防止重叠 */
#nav.show-title #menus,
#nav.show-title .nav-site-title {
opacity: 0 !important;
visibility: hidden !important;
pointer-events: none !important;
}
/* 3. 修正文章标题的基础状态,防止它在页面顶端时乱入 */
#nav .nav-page-title {
display: none; /* 默认隐藏,由 show-title 类名控制 */
transition: opacity 0.3s ease;
}
/* 4. 保持你原本 blog-info 的溢出显示,确保指纹菜单可用 */
#nav #blog-info {
overflow: visible !important;
}