Warning: file_exists(): open_basedir restriction in effect. File(/bin/bash) is not within the allowed path(s): (/www/wwwroot/www.chinaenglish.com/:/tmp/) in /www/wwwroot/www.chinaenglish.com/includes/Shell/CommandFactory.php on line 105
MediaWiki:Minerva.css - ChinaEnglish

MediaWiki:Minerva.css

Revision as of 14:31, 31 October 2026 by Chinaenglish (talk | contribs) (Created page with "→All CSS here will be loaded for users of the MinervaNeue skin: →仅在查看首页时,针对 Minerva 皮肤生效: body.skin-minerva.page-Main_Page .header-container .branding-box h1 { →1. 将文字颜色设为透明,使其不可见: color: transparent !important; →2. 移除文字本身的背景,准备用图片作为背景: background-color: transparent !important; →3. 用你的图片作为背景: backgroun...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* All CSS here will be loaded for users of the MinervaNeue skin */




/* 仅在查看首页时,针对 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("你的图片完整URL地址");
    background-repeat: no-repeat;
    background-position: left center; /* 图片靠左,垂直居中 */
    background-size: contain; /* 或者使用 cover,根据图片比例调整 */
    
    /* 4. 根据图片高度调整这里的高度,确保图片能完整显示 */
    height: 40px; /* 示例高度,请按需修改 */
    width: 200px;  /* 示例宽度,请按需修改 */
    
    /* 保证文字透明后,原文字依然占据空间,从而“撑开”图片区域 */
    text-indent: -9999px; 
    overflow: hidden;
}