打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

Template:少女前线/styles.css:修订间差异

模板页面
弃权者留言 | 贡献
无编辑摘要
弃权者留言 | 贡献
无编辑摘要
第12行: 第12行:
     padding: 6px 12px;
     padding: 6px 12px;
     background-color: var(--color-primary, #3366ff);
     background-color: var(--color-primary, #3366ff);
     color: var(--color-inverted, #fff);
     color: #fff;
     font-weight: bold;
     font-weight: bold;
    flex-shrink: 0;
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
第21行: 第20行:
.gfl-item {
.gfl-item {
     flex: 1;
     flex: 1;
     min-width: 28%; /* 确保移动端一行约3个 */
     min-width: 80px;
     outline: none;
     outline: none; /* 必须保留,用于接收焦点 */
}
}


第32行: 第31行:
     text-align: center;
     text-align: center;
     cursor: pointer;
     cursor: pointer;
    white-space: nowrap;
}
}


/* 子菜单核心逻辑:全宽铺满 */
.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: 101;
     z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
     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 {
     display: block !important;
     list-style-type: none !important;
    list-style-image: none !important;
     margin: 0 !important;
     margin: 0 !important;
     padding: 0 !important;
     padding: 0 !important;
     list-style: none !important;
     display: inline !important; /* 让列表项排成一排 */
}
}


.gfl-links-wrap {
.gfl-links-wrap {
     display: grid;
     line-height: 2.5; /* 增加行高,防止上下链接太挤 */
     grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
     white-space: normal; /* 允许换行 */
    gap: 8px;
}
}


/* 将链接美化为小标签 */
.gfl-links-wrap a {
.gfl-links-wrap a {
     display: block;
     display: inline-block;
     padding: 6px 4px;
     padding: 2px 10px;
     background-color: var(--background-color-interactive-subtle, #f0f0f0);
    margin: 2px 4px;
     text-align: center;
     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;
    color: var(--color-base, inherit) !important;
    font-size: 12px;
     border-radius: 2px;
     border-radius: 2px;
    border: 1px solid var(--border-color-base, #ccc);
}
}


.gfl-links-wrap a:hover {
.gfl-links-wrap a:hover {
     background-color: var(--color-primary, #3366ff);
     border-color: var(--color-primary, #3366ff);
     color: #fff !important;
     background-color: var(--background-color-primary-subtle, rgba(51,102,255,0.1));
}
}


@media (max-width: 768px) {
@media (max-width: 768px) {
     .gfl-logo-box {
     .gfl-item {
         width: 100%;
         flex: none;
         justify-content: center;
         width: calc(33.33% - 4px);
        margin-bottom: 2px;
     }
     }
     /* 移动端强制内容在所有行之后弹出 */
     .gfl-logo-box { width: 100%; justify-content: center; }
   
     .gfl-content {
     .gfl-content {
         position: static; /* 手机端改为折叠展开模式,防止遮挡和溢出 */
         /* 移动端弹出层宽度自适应容器 */
         width: 100%;
         width: 100%;
        margin-top: 4px;
     }
     }
}
}

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%;
    }
}