Template:少女前线/styles.css:修订间差异
模板页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第4行: | 第4行: | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
position: relative; | position: relative; | ||
background-color: | background-color: #fcfcfc; | ||
border: 1px solid | border: 1px solid #ddd; | ||
line-height: 1. | line-height: 1.5; | ||
} | } | ||
.gfl-logo-box { | .gfl-logo-box { | ||
width: | width: 54px; | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
justify-content: center; | justify-content: center; | ||
border-right: 1px solid | border-right: 1px solid #ddd; | ||
background-color: #f8f9fa; | |||
} | } | ||
.gfl-logo-box img { | .gfl-logo-box img { max-height: 30px; width: auto; } | ||
} | |||
.gfl-item { | .gfl-item { | ||
flex: 1; | flex: 1; | ||
min-width: | min-width: 80px; | ||
position: relative; | position: relative; | ||
outline: none; | outline: none; | ||
| 第31行: | 第29行: | ||
.gfl-title { | .gfl-title { | ||
display: block; | display: block; | ||
padding: | padding: 10px 4px; | ||
text-align: center; | text-align: center; | ||
cursor: pointer; | cursor: pointer; | ||
font-size: 13px; | font-size: 13px; | ||
color: #333; | |||
transition: all 0.2s; | transition: all 0.2s; | ||
} | } | ||
.gfl-item:hover .gfl-title, | .gfl-item:hover .gfl-title, .gfl-item:focus .gfl-title { | ||
.gfl-item:focus .gfl-title { | |||
color: #E6A23C; | color: #E6A23C; | ||
background-color: #fff; | |||
background-color: | |||
} | } | ||
| 第50行: | 第45行: | ||
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: #fff !important; | |||
background: | |||
border: 1px solid #E6A23C; | border: 1px solid #E6A23C; | ||
z-index: 1000; | z-index: 1000; | ||
overflow: hidden; | overflow: hidden; | ||
| 第63行: | 第55行: | ||
} | } | ||
.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; | ||
visibility: visible; | visibility: visible; | ||
} | } | ||
.gfl-links-wrap { | .gfl-links-wrap { display: flex; flex-direction: column; padding: 6px; } | ||
} | |||
.gfl-links-wrap a { | .gfl-links-wrap a { | ||
display: block; | display: block; padding: 8px; margin: 2px 0; | ||
font-size: 12px; text-align: center; | |||
background-color: #f9f9f9; | |||
font-size: 12px; | border: 1px solid #eee; | ||
color: #3366ff !important; | |||
background-color: | |||
border: 1px solid | |||
text-decoration: none !important; | text-decoration: none !important; | ||
} | } | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.gfl-logo-box { | .gfl-logo-box { display: none; } | ||
.gfl-nav-compact { | .gfl-nav-compact { | ||
border | background-color: #fff; | ||
border: 1px solid #eee; | |||
} | } | ||
| 第101行: | 第82行: | ||
width: 33.33% !important; | width: 33.33% !important; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
border- | border-right: 1px solid #eee; | ||
border- | border-bottom: 1px solid #eee; | ||
} | } | ||
.gfl-item:nth-child(3n) { | .gfl-item:nth-child(3n), .gfl-item:last-child { border-right: none; } | ||
.gfl-item:nth-last-child(-n+3) { border-bottom: none; } | |||
} | |||
.gfl-title { | .gfl-title { padding: 14px 2px; font-weight: 500; } | ||
.gfl-content { | .gfl-content { | ||
position: | position: absolute; | ||
top: 100%; | |||
left: 0; width: 300%; | |||
border | border: 1px solid #E6A23C; | ||
box-shadow: 0 4px 12px rgba(0,0,0,0.1); | |||
} | } | ||
/* 修正不同位置标题弹出层的对齐 */ | |||
.gfl-item:nth-child(3n-1) .gfl-content { left: -100%; } | |||
.gfl-item:nth-child(3n) .gfl-content { left: -200%; } | |||
.gfl-links-wrap | .gfl-links-wrap { | ||
display: grid; | |||
grid-template-columns: 1fr 1fr; | |||
gap: 4px; | |||
} | } | ||
.gfl-links-wrap a { text-align: center; padding: 10px 4px; border: 1px solid #eee; background: #fcfcfc; } | |||
} | } | ||
2026年5月7日 (四) 08:41的版本
.gfl-nav-compact {
margin: 1em 0;
display: flex;
flex-wrap: wrap;
position: relative;
background-color: #fcfcfc;
border: 1px solid #ddd;
line-height: 1.5;
}
.gfl-logo-box {
width: 54px;
display: flex;
align-items: center;
justify-content: center;
border-right: 1px solid #ddd;
background-color: #f8f9fa;
}
.gfl-logo-box img { max-height: 30px; width: auto; }
.gfl-item {
flex: 1;
min-width: 80px;
position: relative;
outline: none;
}
.gfl-title {
display: block;
padding: 10px 4px;
text-align: center;
cursor: pointer;
font-size: 13px;
color: #333;
transition: all 0.2s;
}
.gfl-item:hover .gfl-title, .gfl-item:focus .gfl-title {
color: #E6A23C;
background-color: #fff;
}
.gfl-content {
display: grid;
grid-template-rows: 0fr;
transition: grid-template-rows 0.2s;
position: absolute;
top: 100%; left: 0; width: 100%;
background: #fff !important;
border: 1px solid #E6A23C;
z-index: 1000;
overflow: hidden;
visibility: hidden;
}
.gfl-item:hover .gfl-content, .gfl-item:focus .gfl-content {
grid-template-rows: 1fr;
visibility: visible;
}
.gfl-links-wrap { display: flex; flex-direction: column; padding: 6px; }
.gfl-links-wrap a {
display: block; padding: 8px; margin: 2px 0;
font-size: 12px; text-align: center;
background-color: #f9f9f9;
border: 1px solid #eee;
color: #3366ff !important;
text-decoration: none !important;
}
@media (max-width: 768px) {
.gfl-logo-box { display: none; }
.gfl-nav-compact {
background-color: #fff;
border: 1px solid #eee;
}
.gfl-item {
flex: none;
width: 33.33% !important;
box-sizing: border-box;
border-right: 1px solid #eee;
border-bottom: 1px solid #eee;
}
.gfl-item:nth-child(3n), .gfl-item:last-child { border-right: none; }
.gfl-item:nth-last-child(-n+3) { border-bottom: none; }
.gfl-title { padding: 14px 2px; font-weight: 500; }
.gfl-content {
position: absolute;
top: 100%;
left: 0; width: 300%;
border: 1px solid #E6A23C;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
/* 修正不同位置标题弹出层的对齐 */
.gfl-item:nth-child(3n-1) .gfl-content { left: -100%; }
.gfl-item:nth-child(3n) .gfl-content { left: -200%; }
.gfl-links-wrap {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 4px;
}
.gfl-links-wrap a { text-align: center; padding: 10px 4px; border: 1px solid #eee; background: #fcfcfc; }
}