Template:少女前线/styles.css:修订间差异
模板页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第12行: | 第12行: | ||
padding: 6px 12px; | padding: 6px 12px; | ||
background-color: var(--color-primary, #3366ff); | background-color: var(--color-primary, #3366ff); | ||
color: | color: #fff; | ||
font-weight: bold; | font-weight: bold; | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
| 第21行: | 第20行: | ||
.gfl-item { | .gfl-item { | ||
flex: 1; | flex: 1; | ||
min-width: | min-width: 80px; | ||
outline: none; | outline: none; /* 必须保留,用于接收焦点 */ | ||
} | } | ||
| 第32行: | 第31行: | ||
text-align: center; | text-align: center; | ||
cursor: pointer; | cursor: pointer; | ||
} | } | ||
.gfl-content { | .gfl-content { | ||
display: none; | display: none; | ||
position: absolute; | position: absolute; | ||
top: 100%; | top: 100%; | ||
left: 0; | left: 0; | ||
right: 0; | right: 0; | ||
| 第46行: | 第43行: | ||
border: 1px solid var(--color-primary, #3366ff); | border: 1px solid var(--color-primary, #3366ff); | ||
padding: 12px; | padding: 12px; | ||
z-index: | z-index: 1000; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
} | } | ||
/* 仅使用 hover 和 focus 两个最基础的选择器 */ | |||
.gfl-item:hover .gfl-content, | .gfl-item:hover .gfl-content, | ||
.gfl-item:focus .gfl-content { | .gfl-item:focus .gfl-content { | ||
| 第62行: | 第59行: | ||
} | } | ||
/* | /* 彻底清除 Wiki 列表的星号和缩进 */ | ||
.gfl-links-wrap ul, | .gfl-links-wrap ul, | ||
.gfl-links-wrap li { | .gfl-links-wrap li { | ||
list-style-type: none !important; | |||
list-style-image: none !important; | |||
margin: 0 !important; | margin: 0 !important; | ||
padding: 0 !important; | padding: 0 !important; | ||
display: inline !important; /* 让列表项排成一排 */ | |||
} | } | ||
.gfl-links-wrap { | .gfl-links-wrap { | ||
line-height: 2.5; /* 增加行高,防止上下链接太挤 */ | |||
white-space: normal; /* 允许换行 */ | |||
} | } | ||
/* 将链接美化为小标签 */ | |||
.gfl-links-wrap a { | .gfl-links-wrap a { | ||
display: block; | display: inline-block; | ||
padding: | padding: 2px 10px; | ||
background-color: var(--background-color-interactive-subtle, | margin: 2px 4px; | ||
background-color: var(--background-color-interactive-subtle, rgba(0,0,0,0.05)); | |||
color: var(--color-base, inherit) !important; | |||
text-decoration: none !important; | text-decoration: none !important; | ||
border-radius: 2px; | border-radius: 2px; | ||
border: 1px solid var(--border-color-base, #ccc); | |||
} | } | ||
.gfl-links-wrap a:hover { | .gfl-links-wrap a:hover { | ||
border-color: var(--color-primary, #3366ff); | |||
color: | background-color: var(--background-color-primary-subtle, rgba(51,102,255,0.1)); | ||
} | } | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.gfl- | .gfl-item { | ||
flex: none; | |||
width: calc(33.33% - 4px); | |||
} | } | ||
.gfl-logo-box { width: 100%; justify-content: center; } | |||
.gfl-content { | .gfl-content { | ||
/* 移动端弹出层宽度自适应容器 */ | |||
width: 100%; | width: 100%; | ||
} | } | ||
} | } | ||
2026年5月7日 (四) 07:03的版本
.gfl-nav-compact {
margin: 0.5em 0;
display: flex;
flex-wrap: wrap;
gap: 4px;
font-size: 13px;
position: relative;
color: var(--color-base, inherit);
}
.gfl-logo-box {
padding: 6px 12px;
background-color: var(--color-primary, #3366ff);
color: #fff;
font-weight: bold;
display: flex;
align-items: center;
}
.gfl-item {
flex: 1;
min-width: 80px;
outline: none; /* 必须保留,用于接收焦点 */
}
.gfl-title {
display: block;
padding: 8px 4px;
background-color: var(--background-color-neutral-subtle, rgba(0,0,0,0.05));
border-bottom: 2px solid var(--border-color-base, #ccc);
text-align: center;
cursor: pointer;
}
.gfl-content {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
width: 100%;
background-color: var(--background-color-base, #fff);
border: 1px solid var(--color-primary, #3366ff);
padding: 12px;
z-index: 1000;
box-sizing: border-box;
}
/* 仅使用 hover 和 focus 两个最基础的选择器 */
.gfl-item:hover .gfl-content,
.gfl-item:focus .gfl-content {
display: block;
}
.gfl-item:hover .gfl-title,
.gfl-item:focus .gfl-title {
border-bottom-color: var(--color-primary, #3366ff);
color: var(--color-primary, #3366ff);
}
/* 彻底清除 Wiki 列表的星号和缩进 */
.gfl-links-wrap ul,
.gfl-links-wrap li {
list-style-type: none !important;
list-style-image: none !important;
margin: 0 !important;
padding: 0 !important;
display: inline !important; /* 让列表项排成一排 */
}
.gfl-links-wrap {
line-height: 2.5; /* 增加行高,防止上下链接太挤 */
white-space: normal; /* 允许换行 */
}
/* 将链接美化为小标签 */
.gfl-links-wrap a {
display: inline-block;
padding: 2px 10px;
margin: 2px 4px;
background-color: var(--background-color-interactive-subtle, rgba(0,0,0,0.05));
color: var(--color-base, inherit) !important;
text-decoration: none !important;
border-radius: 2px;
border: 1px solid var(--border-color-base, #ccc);
}
.gfl-links-wrap a:hover {
border-color: var(--color-primary, #3366ff);
background-color: var(--background-color-primary-subtle, rgba(51,102,255,0.1));
}
@media (max-width: 768px) {
.gfl-item {
flex: none;
width: calc(33.33% - 4px);
}
.gfl-logo-box { width: 100%; justify-content: center; }
.gfl-content {
/* 移动端弹出层宽度自适应容器 */
width: 100%;
}
}