MediaWiki:Common.css:修訂間差異
跳至導覽
跳至搜尋
無編輯摘要 |
無編輯摘要 |
||
| 第1行: | 第1行: | ||
/* 此 CSS 會套用至所有的介面外觀 */ | /* 此 CSS 會套用至所有的介面外觀 */ | ||
/* ================================================== | |||
Encyclato 資訊面板統一樣式 | |||
建議貼到 MediaWiki:Common.css 最下方 | |||
================================================== */ | |||
.infobox { | .infobox { | ||
float: right; | float: right; | ||
| 第14行: | 第19行: | ||
background: #f8f9fa; | background: #f8f9fa; | ||
color: #202122; | |||
font-size: 90%; | font-size: 90%; | ||
line-height: 1.5; | line-height: 1.5; | ||
} | } | ||
/* 面板主標題 */ | |||
.infobox caption { | .infobox caption { | ||
padding: 0.7em 0. | padding: 0.7em 0.55em; | ||
background: #f8f9fa; | |||
font-size: 130%; | font-size: 130%; | ||
font-weight: 700; | font-weight: 700; | ||
text-align: center; | text-align: center; | ||
} | } | ||
/* 一般儲存格 */ | |||
.infobox th, | .infobox th, | ||
.infobox td { | .infobox td { | ||
padding: 0. | box-sizing: border-box; | ||
padding: 0.42em 0.6em; | |||
vertical-align: top; | vertical-align: top; | ||
} | } | ||
.infobox th | /* 左側欄位名稱 */ | ||
width: | .infobox th.infobox-label { | ||
width: 38%; | |||
border-right: 1px solid #eaecf0; | |||
border-bottom: 1px solid #eaecf0; | |||
background: #f8f9fa; | |||
font-weight: 600; | font-weight: 600; | ||
text-align: center; | |||
white-space: nowrap; | |||
} | } | ||
.infobox td { | /* 右側欄位內容 */ | ||
.infobox th.infobox-label + td { | |||
border-bottom: 1px solid #eaecf0; | |||
text-align: left; | text-align: left; | ||
} | } | ||
/* | /* | ||
* 二字、三字、四字欄位統一佔 4 個中文字寬度。 | |||
* | |||
* 例: | |||
* 首 都 | |||
* 所 屬 洲 | |||
* 官 方 語 言 | |||
* | |||
* text-align-last: justify 會把字距平均分配, | |||
* 讓不同字數看起來仍然整齊。 | |||
*/ | |||
.infobox .infobox-label-text { | |||
display: inline-block; | |||
width: 4em; | |||
text-align: justify; | |||
text-align-last: justify; | |||
text-justify: inter-character; | |||
} | |||
/* 動態欄位,例如領袖職稱、建立事件名稱 */ | |||
.infobox th.infobox-label-dynamic { | |||
white-space: normal; | |||
text-align: center; | |||
} | |||
/* 大分類標題:基本資料、政治、地理、國防等 */ | |||
.infobox .infobox-section { | .infobox .infobox-section { | ||
width: auto; | width: auto; | ||
padding: 0.55em 0.6em; | |||
border-top: 6px solid #ffffff; | |||
border-bottom: 1px solid #a2a9b1; | |||
background: #eaecf0; | |||
font-weight: 700; | |||
text-align: center; | text-align: center; | ||
letter-spacing: 0.08em; | |||
} | |||
/* 國旗與國徽並排 */ | |||
.infobox .infobox-symbol-cell { | |||
width: 50%; | |||
padding: 0.65em 0.35em; | |||
text-align: center; | |||
vertical-align: top; | |||
} | |||
/* 國旗與國徽圖片使用同高展示區,避免上下亂跳 */ | |||
.infobox .infobox-symbol-media { | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
min-height: 120px; | |||
} | |||
/* 國旗 / 國徽名稱 */ | |||
.infobox .infobox-symbol-name { | |||
display: block; | |||
margin-bottom: 0.15em; | |||
text-align: center; | |||
} | } | ||
/* | /* 圖片不得撐破資訊框 */ | ||
.infobox img { | .infobox img { | ||
max-width: 100%; | max-width: 100%; | ||
| 第67行: | 第137行: | ||
} | } | ||
/* | /* 窄螢幕 */ | ||
@media screen and (max-width: 720px) { | @media screen and (max-width: 720px) { | ||
.infobox { | .infobox { | ||
| 第77行: | 第147行: | ||
margin: 1em 0; | margin: 1em 0; | ||
} | |||
.infobox th.infobox-label { | |||
width: 36%; | |||
} | |||
.infobox .infobox-section { | |||
border-top-width: 4px; | |||
} | } | ||
} | } | ||
2026年9月18日 (五) 03:21的版本
/* 此 CSS 會套用至所有的介面外觀 */
/* ==================================================
Encyclato 資訊面板統一樣式
建議貼到 MediaWiki:Common.css 最下方
================================================== */
.infobox {
float: right;
clear: right;
width: 22em;
max-width: 100%;
margin: 0 0 1em 1.5em;
border: 1px solid #a2a9b1;
border-collapse: collapse;
background: #f8f9fa;
color: #202122;
font-size: 90%;
line-height: 1.5;
}
/* 面板主標題 */
.infobox caption {
padding: 0.7em 0.55em;
background: #f8f9fa;
font-size: 130%;
font-weight: 700;
text-align: center;
}
/* 一般儲存格 */
.infobox th,
.infobox td {
box-sizing: border-box;
padding: 0.42em 0.6em;
vertical-align: top;
}
/* 左側欄位名稱 */
.infobox th.infobox-label {
width: 38%;
border-right: 1px solid #eaecf0;
border-bottom: 1px solid #eaecf0;
background: #f8f9fa;
font-weight: 600;
text-align: center;
white-space: nowrap;
}
/* 右側欄位內容 */
.infobox th.infobox-label + td {
border-bottom: 1px solid #eaecf0;
text-align: left;
}
/*
* 二字、三字、四字欄位統一佔 4 個中文字寬度。
*
* 例:
* 首 都
* 所 屬 洲
* 官 方 語 言
*
* text-align-last: justify 會把字距平均分配,
* 讓不同字數看起來仍然整齊。
*/
.infobox .infobox-label-text {
display: inline-block;
width: 4em;
text-align: justify;
text-align-last: justify;
text-justify: inter-character;
}
/* 動態欄位,例如領袖職稱、建立事件名稱 */
.infobox th.infobox-label-dynamic {
white-space: normal;
text-align: center;
}
/* 大分類標題:基本資料、政治、地理、國防等 */
.infobox .infobox-section {
width: auto;
padding: 0.55em 0.6em;
border-top: 6px solid #ffffff;
border-bottom: 1px solid #a2a9b1;
background: #eaecf0;
font-weight: 700;
text-align: center;
letter-spacing: 0.08em;
}
/* 國旗與國徽並排 */
.infobox .infobox-symbol-cell {
width: 50%;
padding: 0.65em 0.35em;
text-align: center;
vertical-align: top;
}
/* 國旗與國徽圖片使用同高展示區,避免上下亂跳 */
.infobox .infobox-symbol-media {
display: flex;
align-items: center;
justify-content: center;
min-height: 120px;
}
/* 國旗 / 國徽名稱 */
.infobox .infobox-symbol-name {
display: block;
margin-bottom: 0.15em;
text-align: center;
}
/* 圖片不得撐破資訊框 */
.infobox img {
max-width: 100%;
height: auto;
}
/* 窄螢幕 */
@media screen and (max-width: 720px) {
.infobox {
float: none;
clear: both;
width: auto;
max-width: 100%;
margin: 1em 0;
}
.infobox th.infobox-label {
width: 36%;
}
.infobox .infobox-section {
border-top-width: 4px;
}
}