创建页面,内容为“→这里放置的CSS将应用于MinervaNeue皮肤: →=== 强制 Minerva 皮肤显示图片 Logo ===: →1. 定位到顶部的品牌区域: .branding-box { →确保容器有足够的高度容纳图片: min-height: 130px; display: flex; align-items: center; } →2. 隐藏默认的文字 "门球百科": .branding-box > a > span { display: none !important; } →3. 将链接标签本身变成图片容器: .branding-box > a {…” |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/* === 强制 Minerva 皮肤显示图片 Logo === */ | /* === 强制 Minerva 皮肤显示图片 Logo === */ | ||
| 第5行: | 第4行: | ||
.branding-box { | .branding-box { | ||
/* 确保容器有足够的高度容纳图片 */ | /* 确保容器有足够的高度容纳图片 */ | ||
min-height: | min-height: 40px; | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
| 第18行: | 第17行: | ||
.branding-box > a { | .branding-box > a { | ||
/* 替换为您自己的 Logo 图片 URL */ | /* 替换为您自己的 Logo 图片 URL */ | ||
background-image: url('http://baike.menqiu.cn/resources/assets/menqiu-wiki.png'); | background-image: url('http://baike.menqiu.cn/resources/assets/menqiu-long-wiki.png'); | ||
background-repeat: no-repeat; | background-repeat: no-repeat; | ||
| 第26行: | 第25行: | ||
/* 根据您图片的实际比例调整宽高 */ | /* 根据您图片的实际比例调整宽高 */ | ||
/* 如果图片是长方形的,可以适当增加 width */ | /* 如果图片是长方形的,可以适当增加 width */ | ||
width: | width: 120px; | ||
height: | height: 40px; | ||
display: inline-block; | display: inline-block; | ||
| 第44行: | 第43行: | ||
.branding-box > a { | .branding-box > a { | ||
width: 150px; /* 大屏幕稍微大一点 */ | width: 150px; /* 大屏幕稍微大一点 */ | ||
height: | height: 50px; | ||
} | } | ||
} | } | ||
2026年2月20日 (五) 13:20的最新版本
/* === 强制 Minerva 皮肤显示图片 Logo === */
/* 1. 定位到顶部的品牌区域 */
.branding-box {
/* 确保容器有足够的高度容纳图片 */
min-height: 40px;
display: flex;
align-items: center;
}
/* 2. 隐藏默认的文字 "门球百科" */
.branding-box > a > span {
display: none !important;
}
/* 3. 将链接标签本身变成图片容器 */
.branding-box > a {
/* 替换为您自己的 Logo 图片 URL */
background-image: url('http://baike.menqiu.cn/resources/assets/menqiu-long-wiki.png');
background-repeat: no-repeat;
background-position: left center;
background-size: contain; /* 自动缩放以适应高度 */
/* 根据您图片的实际比例调整宽高 */
/* 如果图片是长方形的,可以适当增加 width */
width: 120px;
height: 40px;
display: inline-block;
/* 隐藏链接可能自带的下划线或文字缩进 */
text-indent: -9999px;
overflow: hidden;
white-space: nowrap;
/* 移除默认的内边距,让图片紧贴边缘 */
padding: 0;
margin: 0;
}
/* 4. (可选) 针对大屏手机/平板的微调 */
@media (min-width: 768px) {
.branding-box > a {
width: 150px; /* 大屏幕稍微大一点 */
height: 50px;
}
}