檢視MediaWiki:Common.css的原始碼
←
MediaWiki:Common.css
跳至導覽
跳至搜尋
您沒有權限執行編輯此頁面,由於以下幾個原因:
您請求的操作只有這個群組的使用者能使用:
使用者
本頁用來提供此 Wiki 軟體介面上的文字,並且已被設為保護以防止惡意修改。 如欲增加或修改 Wiki 的翻譯,請至
translatewiki.net
上的 MediaWiki 在地化專案。
您沒有權限來編輯此 CSS 頁面,因為這會影響到所有的網站訪客。
您可以檢視並複製此頁面的原始碼。
/* ========================================================= Encyclato 資訊面板 維基風格・靠右・分隔版 請用這份完整取代舊的資訊面板 CSS ========================================================= */ /* ------------------------- 1. 資訊面板本體 ------------------------- */ table.encyclato-infobox { float: right !important; clear: right !important; width: 22em; max-width: calc(100% - 1em); margin: 0 0 1em 1.25em !important; border: 1px solid #a2a9b1; border-collapse: collapse; border-spacing: 0; background: #f8f9fa; color: #202122; font-size: 90%; line-height: 1.24; box-sizing: border-box; } /* ------------------------- 2. 主標題 ------------------------- */ table.encyclato-infobox > caption { padding: 0.55em 0.6em; border: 1px solid #a2a9b1; border-bottom: 0; background: #f8f9fa; color: #202122; font-size: 125%; font-weight: 700; line-height: 1.35; text-align: center; } table.encyclato-infobox .infobox-native-name { font-size: 80%; font-weight: 400; } /* ------------------------- 3. 一般儲存格 ------------------------- */ table.encyclato-infobox > tbody > tr > th, table.encyclato-infobox > tbody > tr > td { box-sizing: border-box; padding: 0.10em 0.48em; border-bottom: 1px solid #eaecf0; vertical-align: middle; } /* ------------------------- 4. 左側欄名 ------------------------- */ table.encyclato-infobox > tbody > tr > th.infobox-label { width: 38%; background: #f8f9fa; font-weight: 600; text-align: center; border-right: 1px solid #eaecf0; } /* 右側內容 */ table.encyclato-infobox > tbody > tr > th.infobox-label + td { width: 62%; background: #ffffff; text-align: left; overflow-wrap: anywhere; } /* 二字、三字、四字欄名整齊排版 */ table.encyclato-infobox .infobox-label-text { display: inline-block; width: 4em; text-align: justify; text-align-last: justify; text-justify: inter-character; white-space: nowrap; } /* 動態欄名不要硬撐四字 */ table.encyclato-infobox > tbody > tr > th.infobox-label-dynamic { white-space: normal; line-height: 1.35; } /* ------------------------- 5. 大分類標題 ------------------------- */ table.encyclato-infobox > tbody > tr > th.infobox-section { width: auto; padding: 0.28em 0.55em; border-top: 0; border-bottom: 1px solid #a2a9b1; background: #eaecf0; color: #202122; font-weight: 700; text-align: center; letter-spacing: 0.05em; } /* ------------------------- 6. 次級分類 例如人物公職名稱 ------------------------- */ table.encyclato-infobox > tbody > tr > th.infobox-subsection { padding: 0.24em 0.55em; border-top: 0; border-bottom: 1px solid #c8ccd1; background: #f1f3f5; font-weight: 700; text-align: center; } /* ------------------------- 7. 國旗與國徽 ------------------------- */ table.encyclato-infobox > tbody > tr.infobox-symbol-row > td { width: 50%; padding: 0.4em 0.4em 0.35em; background: #ffffff; text-align: center; vertical-align: middle; } table.encyclato-infobox > tbody > tr.infobox-symbol-row > td + td { border-left: 1px solid #eaecf0; } table.encyclato-infobox .infobox-symbol-name { display: block; margin-bottom: 0.3em; font-weight: 600; text-align: center; } table.encyclato-infobox .infobox-symbol-media { display: block; width: 100%; min-height: 0; height: auto; margin: 0; padding: 0; line-height: 0; text-align: center; } table.encyclato-infobox .infobox-symbol-media img { display: inline-block; max-width: 100%; max-height: none; width: auto; height: auto; margin: 0; padding: 0; vertical-align: middle; } /* ------------------------- 8. 地圖、人物圖像 ------------------------- */ table.encyclato-infobox .infobox-wide-image, table.encyclato-infobox .infobox-image-cell { background: #ffffff; text-align: center; vertical-align: middle; } table.encyclato-infobox .infobox-wide-image img, table.encyclato-infobox .infobox-image-cell img { max-width: 100%; height: auto; margin: 0 auto; } /* ------------------------- 9. 簽名 ------------------------- */ table.encyclato-infobox .infobox-signature-cell { background: #ffffff; text-align: center; vertical-align: middle; } table.encyclato-infobox .infobox-signature-cell img { max-width: 150px; max-height: 80px; width: auto; height: auto; } /* ------------------------- 10. 備註 ------------------------- */ table.encyclato-infobox .infobox-note { padding: 0.55em 0.65em; background: #ffffff; font-size: 85%; } /* ------------------------- 11. 空白列 ------------------------- */ table.encyclato-infobox > tbody > tr.infobox-hidden { display: none !important; } /* ------------------------- 12. 圖片保護 ------------------------- */ table.encyclato-infobox img { max-width: 100%; height: auto; } /* ------------------------- 13. 連續資訊面板 ------------------------- */ table.encyclato-infobox + table.encyclato-infobox { clear: right; } /* ------------------------- 14. 窄螢幕 注意:不再取消 float 因此不會突然跑到正文正上方 ------------------------- */ @media screen and (max-width: 520px) { table.encyclato-infobox { float: right !important; clear: right !important; width: 21em; max-width: calc(100% - 0.5em); margin: 0 0 1em 0.75em !important; } table.encyclato-infobox > caption { font-size: 120%; } table.encyclato-infobox > tbody > tr > th.infobox-label { width: 39%; } table.encyclato-infobox > tbody > tr > th.infobox-label + td { width: 61%; } } /* ------------------------- 15. 儲存格內多餘下方空白修正 ------------------------- */ /* 一般文字不要額外撐高 */ table.encyclato-infobox > tbody > tr > th, table.encyclato-infobox > tbody > tr > td { min-height: 0; } /* 若儲存格裡有段落,移除段落預設上下邊距 */ table.encyclato-infobox > tbody > tr > th p, table.encyclato-infobox > tbody > tr > td p { margin: 0; } /* 清單若出現在資訊框內,避免上下多留一截 */ table.encyclato-infobox > tbody > tr > th ul, table.encyclato-infobox > tbody > tr > th ol, table.encyclato-infobox > tbody > tr > td ul, table.encyclato-infobox > tbody > tr > td ol { margin-top: 0.15em; margin-bottom: 0.15em; } /* 最後一列不再多畫底線 */ table.encyclato-infobox > tbody > tr:last-child > th, table.encyclato-infobox > tbody > tr:last-child > td { border-bottom: 0; } /* ========================================================= 國旗/國徽空白高度最終修正 ========================================================= */ table.encyclato-infobox > tbody > tr.infobox-symbol-row p { margin: 0; padding: 0; } table.encyclato-infobox > tbody > tr.infobox-symbol-row br:first-child, table.encyclato-infobox > tbody > tr.infobox-symbol-row br:last-child { display: none; } /* ========================================================= 一般欄位緊湊化 只縮短「通稱 / 別稱 / 國家狀態 / 首都 / 政體」這類資料列 不影響國旗、國徽、地圖、人物照片 ========================================================= */ table.encyclato-infobox > tbody > tr.infobox-row > th, table.encyclato-infobox > tbody > tr.infobox-row > td { padding-top: 0.08em !important; padding-bottom: 0.08em !important; line-height: 1.22; } table.encyclato-infobox > tbody > tr.infobox-row > th.infobox-label { min-height: 0; } table.encyclato-infobox > tbody > tr.infobox-row > td { min-height: 0; } /* ========================================================= 區塊緊貼修正 讓上一區最後一列直接接到下一個區段標題 ========================================================= */ table.encyclato-infobox > tbody > tr > th.infobox-section, table.encyclato-infobox > tbody > tr > th.infobox-subsection { border-top: 0 !important; margin-top: 0 !important; } /* 區段標題本身不額外製造外部空隙 */ table.encyclato-infobox > tbody > tr.infobox-section-row, table.encyclato-infobox > tbody > tr.infobox-symbol-heading { margin: 0 !important; padding: 0 !important; } /* ========================================================= 區塊銜接最終版 目的: 1. 不再用 box-shadow 往上蓋,避免遮到上一列文字 2. 每個區塊最後一列多一點下方空間 3. 每個區塊最後一列增加清楚的底線 4. 下一個區塊標題直接銜接,不留白縫 ========================================================= */ /* 所有大區塊標題都直接接在上一列後面 */ table.encyclato-infobox > tbody > tr.infobox-section-row > th.infobox-section, table.encyclato-infobox > tbody > tr.infobox-symbol-heading > th.infobox-section { border-top: 0 !important; box-shadow: none !important; margin-top: 0 !important; } /* 次級區塊亦同 */ table.encyclato-infobox > tbody > tr > th.infobox-subsection { border-top: 0 !important; box-shadow: none !important; } /* 每個區塊第一列不要被上一個分隔規則擠出空白 */ table.encyclato-infobox > tbody > tr.infobox-section-row + tr > th, table.encyclato-infobox > tbody > tr.infobox-section-row + tr > td, table.encyclato-infobox > tbody > tr.infobox-symbol-heading + tr > th, table.encyclato-infobox > tbody > tr.infobox-symbol-heading + tr > td { margin-top: 0 !important; } /* 保證表格儲存格之間完全沒有 spacing */ table.encyclato-infobox { border-collapse: collapse !important; border-spacing: 0 !important; } /* ========================================================= MediaWiki 相容的區塊分隔 不使用 :has(),避免 CSS 驗證錯誤 ========================================================= */ /* * 因為 CSS 無法在不使用 :has() 的情況下 * 自動選中「下一個區塊前的最後一列」, * 所以改成把分隔線畫在下一個區塊標題的最上方。 * 視覺效果等同於上一區最後一列的底線。 */ table.encyclato-infobox > tbody > tr.infobox-section-row > th.infobox-section, table.encyclato-infobox > tbody > tr.infobox-symbol-heading > th.infobox-section, table.encyclato-infobox > tbody > tr > th.infobox-subsection { border-top: 1px solid #a2a9b1 !important; box-shadow: none !important; margin-top: 0 !important; } /* 區塊標題留一點呼吸空間,但不產生白縫 */ table.encyclato-infobox > tbody > tr.infobox-section-row > th.infobox-section, table.encyclato-infobox > tbody > tr.infobox-symbol-heading > th.infobox-section { padding-top: 0.34em !important; padding-bottom: 0.34em !important; } /* 一般資料列保留足夠字體高度,避免被分隔線壓到 */ table.encyclato-infobox > tbody > tr.infobox-row > th, table.encyclato-infobox > tbody > tr.infobox-row > td { padding-top: 0.10em !important; padding-bottom: 0.14em !important; line-height: 1.24 !important; } /* 表格儲存格之間不留額外 spacing */ table.encyclato-infobox { border-collapse: collapse !important; border-spacing: 0 !important; }
返回到「
MediaWiki:Common.css
」。
導覽選單
個人工具
建立帳號
登入
associated-pages
系統訊息
討論
English
視圖
閱讀
檢視原始碼
檢視歷史
更多
搜尋
導覽
首頁
近期變更
隨機頁面
MediaWiki說明
特殊頁面
工具
連結至此的頁面
相關變更
頁面資訊