コンテンツにスキップ

英文维基 | 中文维基 | 日文维基 | 草榴社区

利用者:Kirche/sandbox/Sticky header/styles.css

お知らせ: 保存した後、ブラウザのキャッシュをクリアしてページを再読み込みする必要があります。

多くの WindowsLinux のブラウザ

  • Ctrl を押しながら F5 を押す。

Mac における Safari

  • Shift を押しながら、更新ボタン をクリックする。

Mac における ChromeFirefox

  • Cmd Shift を押しながら R を押す。

詳細についてはWikipedia:キャッシュを消すをご覧ください。

@media screen {
	.sticky {
		position: sticky;
		top: 0;
	}

	body.vector-sticky-header-visible .sticky {
		top: 3.125rem;
	}

	.sticky-header > thead {
		position: sticky;
		top: 0;
		z-index: 10;
	}

	body.vector-sticky-header-visible .sticky-header > thead {
		top: 3.125rem;
	}

	/**
	 * Fix scroll transparency on thead's cell background.
	 */
	.sticky-header {
		background-color: white;
	}
	.sticky-header thead,
	.sticky-header tbody,
	.sticky-header tfoot,
	.sticky-header tr,
	.sticky-header td,
	.sticky-header:not(.wikitable) th {
		background-color: inherit;
	}

	/**
	 * Fix scroll transparency on thead's cell spacing.
	 */
	.sticky-header:not(.wikitable) {
		border-collapse: collapse;
	}

	/**
	 * Fix missing borders due to position sticky and "wikitable" collapsed
	 * borders.
	 */
	.sticky-header.wikitable {
		border-collapse: separate;
		border-color: #a2a9b1; /* Set so same on mobile version (#54595d). */
		border-spacing: 0;
		border-width: 0 1px 1px 0;
	}
	.sticky-header.wikitable td,
	.sticky-header.wikitable th,
	.sticky-header.static-row-numbers.wikitable tbody tr:not(.static-row-header)::before {
		border-color: #a2a9b1; /* Set so same on mobile version (#eaecf0). */
		border-width: 1px 0 0 1px;
	}
	.sticky-header.static-row-numbers.wikitable thead tr::before,
	.sticky-header.static-row-numbers.wikitable .static-row-header::before {
		border-left: 1px solid #a2a9b1;
	}
	.sticky-header.static-row-numbers.wikitable thead tr:first-child::before,
	.sticky-header.static-row-numbers.wikitable .sortbottom::before, /* Sortbotton #1: all. When supported, consolidate #1-2 to tr:nth-child(1 of .sortbottom)::before */
	.sticky-header.static-row-numbers.wikitable:not(.sortable) tr:first-child::before {
		border-top: 1px solid #a2a9b1;
	}
	.sticky-header.static-row-numbers.wikitable .sortbottom ~ .sortbottom::before { /* Sortbottom #2: all minus 1st. */
		border-top: 0;
	}
}

/**
 * Reset Wikipedia styles causing sticky and float issues on mobile.
 * Note: Fixes mobile version on Windows desktop, but not Android portrait mode.
 */
@media all and (max-width: 720px) {
	.sticky-header {
		display: table; /* Was "block" */
	}
	.sticky-header caption {
		display: table-caption; /* Was "block" */
	}
}