Skip to content

Commit 2b2ff66

Browse files
authored
Update f2c-header.css
1 parent 27d904c commit 2b2ff66

1 file changed

Lines changed: 41 additions & 33 deletions

File tree

theme/css/f2c-header.css

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
1-
/* 基础样式(保留,通用且不影响其他内容) */
1+
/* 基础样式(保留) */
22
*,::after,::before{box-sizing:border-box;}
33

44
/* 打印隐藏 */
55
@media print{
66
.hidden-print{display:none!important;}
77
}
88

9-
/* 容器(保留,通用布局) */
9+
/* 容器(保留) */
1010
.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto;}
11-
@media (min-width:576px){
12-
.container{max-width:540px;}
13-
}
14-
@media (min-width:768px){
15-
.container{max-width:720px;}
16-
}
17-
@media (min-width:992px){
18-
.container{max-width:960px;}
19-
}
20-
@media (min-width:1200px){
21-
.container{max-width:1140px;}
22-
}
11+
@media (min-width:576px){.container{max-width:540px;}}
12+
@media (min-width:768px){.container{max-width:720px;}}
13+
@media (min-width:992px){.container{max-width:960px;}}
14+
@media (min-width:1200px){.container{max-width:1140px;}}
2315

2416
/* 可见性控制 */
25-
@media (max-width:767px){
26-
.visible-xs{display:block!important;}
27-
}
17+
@media (max-width:767px){.visible-xs{display:block!important;}}
2818

2919
/* 文本样式 */
3020
.text-muted{color:#6c757d!important;}
3121

32-
/* 基础元素样式(精简,只保留通用部分) */
22+
/* 基础元素样式(保留) */
3323
img{vertical-align:middle;border-style:none;}
3424
svg{overflow:hidden;vertical-align:middle;}
3525
button{border-radius:0;margin:0;font-family:inherit;font-size:inherit;line-height:inherit;overflow:visible;text-transform:none;-webkit-appearance:button;}
@@ -46,25 +36,43 @@ ul{list-style: none;margin: 0;padding: 0;}
4636
/* 隐藏元素 */
4737
.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;}
4838

49-
/* ========== 核心:强制隐藏所有黑色导航栏相关元素 ========== */
50-
#topnav,
51-
.mega-nav-sandbox,
52-
.mega-nav-banner,
53-
div[class*="mega-nav"],
54-
header[class*="topnav"],
55-
.f2c-header,
56-
.sticky { /* 移除粘性定位的黑框容器 */
39+
/* ========== 终极修复:彻底隐藏黑框(含通告栏根容器) ========== */
40+
/* 1. 隐藏旧的飞致云导航相关 */
41+
#topnav, .mega-nav-sandbox, .mega-nav-banner, div[class*="mega-nav"] {
5742
display: none !important;
58-
visibility: hidden !important;
5943
height: 0 !important;
60-
width: 0 !important;
61-
margin: 0 !important;
6244
padding: 0 !important;
45+
margin: 0 !important;
46+
}
47+
48+
/* 2. 关键修复:隐藏截图中的黑色通告栏(含关闭按钮的那个容器) */
49+
/* 匹配 MkDocs Material 的通告栏,或自定义的黑框根容器 */
50+
.md-announce,
51+
body > div:first-child,
52+
body > header:first-child,
53+
/* 兜底:匹配任何置顶的黑色顶部容器 */
54+
div[style*="position: fixed"][style*="top: 0"][style*="background: black"],
55+
div[class*="announce"],
56+
div[class*="banner"] {
57+
display: none !important;
58+
visibility: hidden !important;
59+
height: 0px !important;
60+
width: 100% !important;
6361
border: none !important;
64-
background: none !important;
62+
margin: 0 !important;
63+
padding: 0 !important;
64+
z-index: -1 !important;
65+
}
66+
67+
/* ========== 修复蓝色导航栏置顶 ========== */
68+
/* 确保 Material 蓝色导航栏回到最顶部 */
69+
.md-header {
70+
top: 0 !important;
71+
z-index: 1000 !important;
72+
position: fixed !important;
6573
}
6674

67-
/* 响应式适配(仅保留通用容器适配,移除导航栏相关) */
68-
@media (max-width: 991px){
69-
.container{width:auto;}
75+
/* 确保页面内容不会被置顶的蓝导航栏遮挡(如果需要) */
76+
.md-main {
77+
margin-top: 64px !important;
7078
}

0 commit comments

Comments
 (0)