Template:少女前线/styles.css:修订间差异
模板页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/* PC 端基础样式 */ | |||
.gfl-nav-compact { | .gfl-nav-compact { | ||
margin: 1em 0; | margin: 1em 0; | ||
display: flex; | display: flex; | ||
position: relative; | position: relative; | ||
background-color: var(--background-color-neutral-subtle, #f8f9fa); | background-color: var(--background-color-neutral-subtle, #f8f9fa); | ||
border: 1px solid var(--border-color-base, #ccc); | border: 1px solid var(--border-color-base, #ccc); | ||
} | } | ||
| 第16行: | 第14行: | ||
justify-content: center; | justify-content: center; | ||
border-right: 2px solid #E6A23C; | border-right: 2px solid #E6A23C; | ||
cursor: pointer; | |||
} | } | ||
.gfl-logo-box img { | .gfl-logo-box img { max-height: 28px; width: auto; } | ||
.gfl-menu-container { | |||
display: flex; | |||
flex: 1; | |||
} | } | ||
.gfl-item { | .gfl-item { | ||
flex: 1; | flex: 1; | ||
position: relative; | position: relative; | ||
outline: none; | outline: none; | ||
} | } | ||
.gfl-title { | .gfl-title { | ||
display: block; | display: block; | ||
padding: | padding: 8px 4px; | ||
text-align: center; | text-align: center; | ||
cursor: pointer; | cursor: pointer; | ||
font-size: 13px; | font-size: 13px; | ||
border-bottom: 2px solid transparent; | |||
} | } | ||
.gfl-item:hover .gfl-title, | .gfl-item:hover .gfl-title, .gfl-item:focus .gfl-title { | ||
.gfl-item:focus .gfl-title { | |||
background-color: var(--background-color-interactive-subtle, #eeeeee); | background-color: var(--background-color-interactive-subtle, #eeeeee); | ||
border-bottom-color: #E6A23C; | |||
} | } | ||
/* 下拉链接面板 */ | |||
.gfl-content { | .gfl-content { | ||
display: grid; | display: grid; | ||
grid-template-rows: 0fr; | grid-template-rows: 0fr; | ||
transition: grid-template-rows 0.2s | transition: grid-template-rows 0.2s; | ||
position: absolute; | position: absolute; | ||
top: 100%; | top: 100%; left: 0; width: 100%; | ||
background: var(--background-color-base, #fff) !important; | |||
border: 2px solid #E6A23C; border-top: none; | |||
border: 2px solid #E6A23C; | z-index: 1000; | ||
overflow: hidden; | overflow: hidden; | ||
} | } | ||
.gfl-item:hover .gfl-content, | .gfl-item:hover .gfl-content, .gfl-item:focus .gfl-content { | ||
.gfl-item:focus .gfl-content { | |||
grid-template-rows: 1fr; | grid-template-rows: 1fr; | ||
} | } | ||
.gfl-links-wrap { | .gfl-links-wrap { display: flex; flex-direction: column; padding: 4px; } | ||
} | |||
.gfl-links-wrap a { | .gfl-links-wrap a { | ||
display: block; | display: block; padding: 6px; margin: 2px 0; | ||
font-size: 12px; text-align: center; | |||
background-color: var(--background-color-neutral-subtle, #f8f9fa); | background-color: var(--background-color-neutral-subtle, #f8f9fa); | ||
border: 1px solid var(--border-color-base, #ccc); | |||
color: var(--color-progressive, #3366ff) !important; | color: var(--color-progressive, #3366ff) !important; | ||
} | } | ||
/** | /* --- 移动端:图标触发逻辑 --- */ | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.gfl- | .gfl-nav-compact { | ||
width: 50px; height: 50px; | |||
border: none; background: transparent; | |||
} | } | ||
.gfl-logo-box { | .gfl-logo-box { | ||
width: 50px; height: 50px; | |||
border-radius: 50%; | |||
background: #E6A23C; | |||
box-shadow: 0 4px 10px rgba(0,0,0,0.3); | |||
border: none; | |||
position: fixed; bottom: 30px; right: 20px; z-index: 1001; | |||
} | } | ||
.gfl- | /* 初始隐藏菜单列表 */ | ||
.gfl-menu-container { | |||
display: none; | |||
position: fixed; | |||
bottom: 90px; right: 20px; | |||
width: 180px; | |||
flex-direction: column; | flex-direction: column; | ||
background: var(--background-color-base, #fff); | |||
border: 1px solid #E6A23C; | |||
border-radius: 8px; | |||
box-shadow: 0 4px 15px rgba(0,0,0,0.2); | |||
z-index: 1000; | |||
} | } | ||
.gfl- | /* 激活态显示菜单 */ | ||
.gfl-nav-compact.is-active .gfl-menu-container { | |||
display: flex; | |||
} | } | ||
.gfl-item { width: 100%; } | |||
.gfl-title { | .gfl-title { | ||
text-align: left; | text-align: left; padding: 12px; | ||
border-bottom: 1px solid var(--border-color-base, #eee); | |||
border-bottom: 1px solid var(--border-color-base, # | |||
} | } | ||
/* 移动端二级菜单变为内嵌展开 */ | |||
.gfl-content { | .gfl-content { | ||
position: static; | position: static; border: none; box-shadow: none; | ||
background: var(--background-color-neutral-subtle, #f9f9f9) !important; | |||
background | |||
} | } | ||
.gfl-links-wrap a { text-align: left; padding-left: 20px; border: none; } | |||
} | } | ||
2026年5月7日 (四) 08:29的版本
/* PC 端基础样式 */
.gfl-nav-compact {
margin: 1em 0;
display: flex;
position: relative;
background-color: var(--background-color-neutral-subtle, #f8f9fa);
border: 1px solid var(--border-color-base, #ccc);
}
.gfl-logo-box {
width: 50px;
display: flex;
align-items: center;
justify-content: center;
border-right: 2px solid #E6A23C;
cursor: pointer;
}
.gfl-logo-box img { max-height: 28px; width: auto; }
.gfl-menu-container {
display: flex;
flex: 1;
}
.gfl-item {
flex: 1;
position: relative;
outline: none;
}
.gfl-title {
display: block;
padding: 8px 4px;
text-align: center;
cursor: pointer;
font-size: 13px;
border-bottom: 2px solid transparent;
}
.gfl-item:hover .gfl-title, .gfl-item:focus .gfl-title {
background-color: var(--background-color-interactive-subtle, #eeeeee);
border-bottom-color: #E6A23C;
}
/* 下拉链接面板 */
.gfl-content {
display: grid;
grid-template-rows: 0fr;
transition: grid-template-rows 0.2s;
position: absolute;
top: 100%; left: 0; width: 100%;
background: var(--background-color-base, #fff) !important;
border: 2px solid #E6A23C; border-top: none;
z-index: 1000;
overflow: hidden;
}
.gfl-item:hover .gfl-content, .gfl-item:focus .gfl-content {
grid-template-rows: 1fr;
}
.gfl-links-wrap { display: flex; flex-direction: column; padding: 4px; }
.gfl-links-wrap a {
display: block; padding: 6px; margin: 2px 0;
font-size: 12px; text-align: center;
background-color: var(--background-color-neutral-subtle, #f8f9fa);
border: 1px solid var(--border-color-base, #ccc);
color: var(--color-progressive, #3366ff) !important;
}
/* --- 移动端:图标触发逻辑 --- */
@media (max-width: 768px) {
.gfl-nav-compact {
width: 50px; height: 50px;
border: none; background: transparent;
}
.gfl-logo-box {
width: 50px; height: 50px;
border-radius: 50%;
background: #E6A23C;
box-shadow: 0 4px 10px rgba(0,0,0,0.3);
border: none;
position: fixed; bottom: 30px; right: 20px; z-index: 1001;
}
/* 初始隐藏菜单列表 */
.gfl-menu-container {
display: none;
position: fixed;
bottom: 90px; right: 20px;
width: 180px;
flex-direction: column;
background: var(--background-color-base, #fff);
border: 1px solid #E6A23C;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
z-index: 1000;
}
/* 激活态显示菜单 */
.gfl-nav-compact.is-active .gfl-menu-container {
display: flex;
}
.gfl-item { width: 100%; }
.gfl-title {
text-align: left; padding: 12px;
border-bottom: 1px solid var(--border-color-base, #eee);
}
/* 移动端二级菜单变为内嵌展开 */
.gfl-content {
position: static; border: none; box-shadow: none;
background: var(--background-color-neutral-subtle, #f9f9f9) !important;
}
.gfl-links-wrap a { text-align: left; padding-left: 20px; border: none; }
}