有觉性 以安住且中立的心 照见身心的实相

MediaWiki:Common.css

来自Dhamma.cn
法藏​(留言 | 贡献)2026年8月14日 (五) 19:42的版本

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
  • Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5。
/* 这里放置的CSS将应用于所有皮肤 */


/* 隐藏非登录用户的工具箱特定项目 */

body:not(.user-logged-in) #t-whatlinkshere,  /* 链入页面 */

body:not(.user-logged-in) #t-recentchangeslinked,  /* 相关更改 */



body:not(.user-logged-in) #t-permalink,  /* 固定链接 */

body:not(.user-logged-in) #t-info,  /* 页面信息 */

body:not(.user-logged-in) #t-log {  /* 页面日志 */

    display: none !important;

}




/* 这里放置的CSS将应用于所有皮肤 */
body.page-Main_Page li#ca-talk { display: none !important; }
#ca-talk { display:none!important; }
#ca-viewsource { display:none!important; }

#ca-view { display:none!important; }

/*#ca-move { display:none!important; }*/
#ca-delete { display:none!important; }
#ca-history { display:none!important; }

#ca-nstab-main { display:none!important; }
##ca-watch { display:none!important; }
##li#ca-edit { display: none; }


## 要只在用户按下F11时隐藏 左侧的导航栏
document.onkeydown = function( e ) {
	if( e == null ) e = event
	if( testKey( e, 122 ) ) { //F11
		appendCSS('#column-content {margin: 0 0 .6em 0;} #content {margin: 2.8em 0 0 0;} #p-logo, .generated-sidebar, #p-lang, #p-tb, #p-search {display:none;} #p-cactions {left: .1em;} #footer {display:none;}');
		return false;
	}
}

function testKey( e, intKeyCode ) {
	if( window.createPopup )
		return e.keyCode == intKeyCode
	else
		return e.which == intKeyCode
}


##如何去除"关于此IP地址的讨论"按钮
#p-personal #pt-anonuserpage {
    display: none;
}


/*隐藏首页标题*/
/*.page-首页 #firstHeading{display:none;}*/

/*body.page-Main_Page.action-view h1.firstHeading, body.page-Main_Page.action-submit h1.firstHeading { display: none; }*/

/*Back to top buttom*/
<div id="BackToTop"  class="noprint" style="background-color:#DDEFDD; position:fixed;
 bottom:32px; left:2%; z-index:9999; padding:0; margin:0;"><span style="color:blue;
 font-size:8pt; font-face:verdana,sans-serif;  border:0.2em outset #ceebf7;
 padding:0.1em; font-weight:bolder; -moz-border-radius:8px; ">
[[#top| Back to the Top ]]</span></div>


.catlinks { display: none; }

body {
    font-size: 16px;
    line-height: 1.6em;
}




/* ===================================================
   1. 视频容器:800px 居中(已移除破坏编辑器的 div[style*="width"])
   =================================================== */
.embedvideo,
.embedvideo-container,
.mediaContainer,
.thumbinner {
    width: 100% !important;
    max-width: 800px !important; /* 最大播放宽度 */
    margin: 15px auto !important;
    float: none !important;
}

/* 2. 覆盖所有视频标签 */
.embedvideo video,
.mediaContainer video,
.thumbinner video,
video.mw-file-element,
video {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* ===================================================
   2. MediaWiki EmbedVideo 插件:去除视频文字/标题遮罩
   =================================================== */
.embedvideo-overlay,
.embedvideo-consent-overlay,
.embedvideo-header,
.embedvideo-title,
.embedvideo-service {
    display: none !important;
}



/* 图标去除刺眼的纯白背景,改为半透明极简质感 */
#footer-icons img,
#f-poweredbyico img,
.footer-icons img {
    background-color: rgba(255, 255, 255, 0.12) !important; /* 暗色半透明背景 */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;  /* 细微边框包裹 */
    border-radius: 6px !important;
    filter: brightness(0.9) contrast(1.2);                   /* 提升图标文字清晰度 */
    transition: all 0.3s ease !important;
}





/* 1. 图标基础样式:去掉 padding 挤压,统一卡片外观 */
#footer-icons img,
#f-poweredbyico img,
.footer-icons img,
#footer-poweredbyico img {
    background-color: #ffffff !important;      /* 统一底色 */
    border-radius: 6px !important;             /* 统一圆角 */
    padding: 0 !important;                     /* 👈 关键:取消内边距,彻底防止内部图片被挤压缩小 */
    box-sizing: border-box !important;
    object-fit: contain !important;
    display: block !important;
    opacity: 0.88;                             /* 默认稍微收敛一点亮度 */
    transition: all 0.25s ease-in-out !important; /* 平滑过渡动画 */
}

/* 2. 悬停效果:保持原尺寸,整体微亮 + 轻微向上浮动/放大 */
#footer-icons img:hover,
#f-poweredbyico img:hover,
.footer-icons img:hover {
    opacity: 1 !important;                     /* 恢复 100% 亮白 */
    transform: translateY(-2px) scale(1.04) !important; /* 👈 向上浮动 2px 并微放大 4%,质感极佳 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important; /* 增加轻微投影,营造立体的稳重感 */
}








/* ===================================================
   页尾图标响应式布局(PC 端与手机端区分)
   =================================================== */

/* 1. 统一容器:采用 Flex 布局并开启自动换行与 gap 间距 */
#footer-icons,
.footer-icons,
#f-poweredbyico {
    display: flex !important;
    flex-wrap: wrap !important;         /* 👈 屏幕窄时自动优雅换行 */
    justify-content: center !important; /* 水平居中 */
    align-items: center !important;     /* 垂直居中 */
    gap: 10px !important;               /* 👈 核心:自动控制横向与纵向间距,彻底解决粘连 */
    padding: 0 !important;
    margin: 12px auto !important;
    list-style: none !important;
}

/* 2. 剥离外层容器(li / a)的硬编码样式,只保留图片自身容器 */
#footer-icons li,
#footer-icons a,
.footer-icons li,
.footer-icons a,
#f-poweredbyico li,
#f-poweredbyico a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;              /* 间距交由父级的 gap 统一托管 */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 3. 图片基础样式:统一纯白背景与圆角 */
#footer-icons img,
#f-poweredbyico img,
.footer-icons img,
#footer-poweredbyico img {
    background-color: #ffffff !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    object-fit: contain !important;
    display: block !important;
}


/* ---------------------------------------------------
   💻 PC 端效果 (屏幕宽度 > 768px)
   --------------------------------------------------- */
@media screen and (min-width: 769px) {
    #footer-icons img,
    #f-poweredbyico img,
    .footer-icons img {
        height: 28px !important;       /* PC端统一优雅高度 */
        padding: 3px 8px !important;   /* PC端紧凑卡片内边距 */
    }
}


/* ---------------------------------------------------
   📱 手机端效果 (屏幕宽度 <= 768px)
   --------------------------------------------------- */
@media screen and (max-width: 768px) {
    #footer-icons,
    .footer-icons,
    #f-poweredbyico {
        gap: 10px !important;          /* 👈 手机端纵向堆叠时,保持 10px 独立间距 */
    }

    #footer-icons img,
    #f-poweredbyico img,
    .footer-icons img {
        height: 32px !important;       /* 手机端适当放大高度,更方便手指点击 */
        padding: 4px 10px !important;  /* 手机端卡片内边距 */
    }
}








/* 1. 将页脚容器设置为弹性盒列向排列,并整体居中 */
#footer, .mw-footer {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}

/* 2. 第一层:最后编辑时间与浏览次数等文本信息 */
#footer-info, 
#footer-info-lastmod, 
#footer-info-viewcount {
    order: 1 !important;
    margin-bottom: 8px !important;
}

/* 3. 第二层:Privacy policy / Disclaimers 等声明链接 */
#footer-places {
    order: 2 !important;
    margin-bottom: 8px !important;
}

/* 4. 第三层(最下方):三个图标 */
#footer-icons, 
#f-poweredbyico {
    order: 3 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 35px !important; /* 图标之间的间距 */
    margin-top: 8px !important;
}







/* 在页脚最底部压一条极细的主题色/淡白色底边,如同地基 */
#footer, .mw-footer {
    border-bottom: 4px solid #10b981 !important; /* 这里的颜色可以换成你网站的主主题色 */
    padding-bottom: 24px !important;
}

/* 或者在图标上方加一条渐变过渡线,将图标和上文隔开 */
#footer-icons, #f-poweredbyico {
    position: relative !important;
    padding-top: 16px !important;
}

#footer-icons::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 200px !important; /* 线条比图标宽 */
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent) !important;
}