MediaWiki:Common.css:修訂間差異

出自眾神廳
跳至導覽 跳至搜尋
無編輯摘要
無編輯摘要
第1行: 第1行:
/* 此 CSS 會套用至所有的介面外觀 */
/* 此 CSS 會套用至所有的介面外觀 */
/* ==================================================
/* =========================
   Encyclato 資訊面板統一樣式
   資訊面板窄螢幕修正
   建議貼到 MediaWiki:Common.css 最下方
   ========================= */
================================================== */


.infobox {
.infobox {
     float: right;
     table-layout: fixed;
    clear: right;
     overflow: visible;
 
    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 {
.infobox td {
     box-sizing: border-box;
     overflow-wrap: anywhere;
    padding: 0.42em 0.6em;
     word-break: normal;
     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 {
.infobox .infobox-symbol-cell {
     width: 50%;
     width: 50%;
 
    max-width: 50%;
     padding: 0.65em 0.35em;
     padding: 0.6em 0.35em;


     text-align: center;
     text-align: center;
第115行: 第24行:
}
}


/* 國旗與國徽圖片使用同高展示區,避免上下亂跳 */
.infobox .infobox-symbol-media {
.infobox .infobox-symbol-media {
     display: flex;
     display: flex;
第121行: 第29行:
     justify-content: center;
     justify-content: center;


     min-height: 120px;
     min-height: 115px;
}
    max-width: 100%;


/* 國旗 / 國徽名稱 */
     overflow: hidden;
.infobox .infobox-symbol-name {
     display: block;
    margin-bottom: 0.15em;
    text-align: center;
}
}


/* 圖片不得撐破資訊框 */
.infobox .infobox-symbol-media img {
.infobox img {
     max-width: 100%;
     max-width: 100%;
     height: auto;
     height: auto;
}
}


/* 窄螢幕 */
/* 真正很窄的手機才改成滿版 */
@media screen and (max-width: 720px) {
@media screen and (max-width: 480px) {
     .infobox {
     .infobox {
         float: none;
         float: none;
         clear: both;
         clear: both;


         width: auto;
         width: 100%;
         max-width: 100%;
         max-width: 100%;


第150行: 第53行:


     .infobox th.infobox-label {
     .infobox th.infobox-label {
         width: 36%;
         width: 38%;
     }
     }



2026年9月18日 (五) 03:26的版本

/* 此 CSS 會套用至所有的介面外觀 */
/* =========================
   資訊面板窄螢幕修正
   ========================= */

.infobox {
    table-layout: fixed;
    overflow: visible;
}

.infobox td {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* 國旗、國徽不要把面板撐爆 */
.infobox .infobox-symbol-cell {
    width: 50%;
    max-width: 50%;
    padding: 0.6em 0.35em;

    text-align: center;
    vertical-align: top;
}

.infobox .infobox-symbol-media {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 115px;
    max-width: 100%;

    overflow: hidden;
}

.infobox .infobox-symbol-media img {
    max-width: 100%;
    height: auto;
}

/* 真正很窄的手機才改成滿版 */
@media screen and (max-width: 480px) {
    .infobox {
        float: none;
        clear: both;

        width: 100%;
        max-width: 100%;

        margin: 1em 0;
    }

    .infobox th.infobox-label {
        width: 38%;
    }

    .infobox .infobox-section {
        border-top-width: 4px;
    }
}