MediaWiki:Minerva.css: Difference between revisions

From ChinaEnglish
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
/* All CSS here will be loaded for users of the MinervaNeue skin */
/* All CSS here will be loaded for users of the MinervaNeue skin */


/* ========== 仅首页隐藏Main Page标题(移动端MinervaNeue) ========== */
body.page-Main_Page .mw-page-title-main {
    display: none !important;
}





Revision as of 14:43, 31 October 2026

/* All CSS here will be loaded for users of the MinervaNeue skin */


/* ========== 仅首页隐藏Main Page标题(移动端MinervaNeue) ========== */
body.page-Main_Page .mw-page-title-main {
    display: none !important;
}



/* 仅在查看首页时,针对 Minerva 皮肤生效 */
body.skin-minerva.page-Main_Page .header-container .branding-box h1 {
    /* 1. 将文字颜色设为透明,使其不可见 */
    color: transparent !important;
    
    /* 2. 移除文字本身的背景,准备用图片作为背景 */
    background-color: transparent !important;
    
    /* 3. 用你的图片作为背景 */
    background-image: url("http://www.chinaenglish.com/images/HomeBanner.png");
    background-repeat: no-repeat;
    background-position: left center; /* 图片靠左,垂直居中 */
    background-size: contain; /* 或者使用 cover,根据图片比例调整 */
    
    /* 4. 根据图片高度调整这里的高度,确保图片能完整显示 */
    height: 40px; /* 示例高度,请按需修改 */
    width: 200px;  /* 示例宽度,请按需修改 */
    
    /* 保证文字透明后,原文字依然占据空间,从而“撑开”图片区域 */
    text-indent: -9999px; 
    overflow: hidden;
}