LLWiki正在建设中,欢迎加入我们

MediaWiki:Gadget-stickyHeading.css

来自LLWiki
跳转到导航 跳转到搜索

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

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Internet Explorer:按住Ctrl的同时单击刷新,或按Ctrl-F5
  • Opera:前往菜单 → 设置(Mac为Opera → Preferences),然后隐私和安全 → 清除浏览数据 → 缓存的图片和文件
.stickyHeading .section-container {
	position: relative;
}
.stickyHeading .section-container h2 { /* 防止误伤目录中的h2 */
	position: sticky;
	top: 0;
	z-index: 50;
}
.skin-vector .stickyHeading .section-container h2 {
	background-color: rgb(247,251,255);
}
.skin-minerva .stickyHeading .section-container h2 {
	background-color: #fff;
}
.stickyHeading .section-container .documentation h2,
#Wikiplus-Quickedit-Preview-Output .stickyHeading .section-container h2 {
	position: static;
	background-color: transparent;
}
/* 正常情况下 .infoboxtemplate和#toc都开始于h2的上方,并不需要以下CSS */
.stickyHeading .infoboxtemplate, .stickyHeading #toc {
	position: relative;
	z-index: 51; /* 防止错误压盖右侧float元素 */
}

.collapseHeading .sec-hide {
	display: none !important;
}
.collapseHeading .section-container h2 {
	cursor: pointer;
}
.collapseHeading .mw-ui-icon-before.mw-ui-icon::before {
	content: "";
	background-size: 66.67% auto;
	background-position: center;
	background-repeat: no-repeat;
	float: left;
	min-height: 1.5em;
	width: 1.5em;
	margin-right: 1em;
} 
.collapseHeading .mw-ui-icon {
	line-height: 1.5;
	margin-left: -0.8em;
}
/* [[category:CSS小工具]] [[category:桌面版小工具]] [[category:手机版小工具]] [[category:讨论工具]] [[category:默认开启的小工具]] */
/* {{DEFAULTSORT:stickyHeading.css}} */