打开/关闭菜单
237
885
35
2811
植物大战僵尸杂交版Wiki
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

MediaWiki:Common.css:修订间差异

MediaWiki界面页面
无编辑摘要
标签已被回退
无编辑摘要
标签已被回退
第69行: 第69行:
     }
     }
      
      
     /* 手机端保持一行两个 */
     /* 手机端:用固定宽度让卡片自动换行 */
     .gallery-card,
     .gallery-card,
     .gallery-card-small {
     .gallery-card-small {
         width: calc(50% - 5px);
         width: 120px;           /* 固定宽度,406屏幕一行能放3个 */
         max-width: none;
         max-width: none;
        flex: 0 0 auto;          /* 不放大不缩小,按固定宽度排列 */
         box-sizing: border-box;
         box-sizing: border-box;
     }
     }
第79行: 第80行:
     .flex-gallery {
     .flex-gallery {
         gap: 10px;
         gap: 10px;
    }
   
    /* 确保父容器不浪费空间 */
    .flex-gallery,
    .flex-gallery * {
        box-sizing: border-box;
     }
     }
}
}


/* 超小屏幕(宽度小于480px)时也强行一行两个 */
/* 超小屏幕:卡片进一步缩小 */
@media screen and (max-width: 480px) {
@media screen and (max-width: 480px) {
     .gallery-card,
     .gallery-card,
     .gallery-card-small {
     .gallery-card-small {
         width: calc(50% - 4px);     /* 稍微缩小,挤进去 */
         width: 100px;           /* 更小的固定宽度 */
        flex: 0 0 auto;
         min-width: 0;
         min-width: 0;
        max-width: none;
        box-sizing: border-box;
     }
     }
      
      
     .flex-gallery {
     .flex-gallery {
         gap: 8px;                   /* 缩小间距 */
         gap: 6px;               /* 间距也缩小 */
    }
   
    /* 如果图片有最小宽度限制,强制覆盖 */
    .gallery-card img,
    .gallery-card-small img {
        min-width: 0;
     }
     }
}
}

2026年5月1日 (五) 08:01的版本

/* 电脑端样式 */
.responsive-two-columns .left-col {
    width: 320px;
    vertical-align: top;
}
.responsive-two-columns .right-col {
    vertical-align: top;
    padding-left: 20px;
}

/* 新增:响应式图片卡片样式 */
.gallery-card {
    position: relative;
    width: calc(50% - 5px);
    max-width: 500px;
    text-align: center;
}

.gallery-card-small {
    position: relative;
    width: calc(50% - 5px);
    max-width: 150px;
    text-align: center;
}

.gallery-card img,
.gallery-card-small img {
    width: 100%;
    height: auto;
}

.image-overlay {
    position: absolute;
    bottom: 30px;
    left: 10px;
    text-align: left;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 5px;
    border-radius: 4px;
}

.flex-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
    align-items: flex-start;
}

/* 手机端样式 */
@media screen and (max-width: 768px) {
    .responsive-two-columns,
    .responsive-two-columns tbody,
    .responsive-two-columns tr,
    .responsive-two-columns td {
        display: block;
        width: 100%;
    }
    
    .responsive-two-columns .right-col {
        padding-left: 0;
        margin-top: 20px;
    }
    
    .responsive-two-columns img {
        max-width: 100%;
        height: auto;
    }
    
    /* 手机端:用固定宽度让卡片自动换行 */
    .gallery-card,
    .gallery-card-small {
        width: 120px;            /* 固定宽度,406屏幕一行能放3个 */
        max-width: none;
        flex: 0 0 auto;          /* 不放大不缩小,按固定宽度排列 */
        box-sizing: border-box;
    }
    
    .flex-gallery {
        gap: 10px;
    }
}

/* 超小屏幕:卡片进一步缩小 */
@media screen and (max-width: 480px) {
    .gallery-card,
    .gallery-card-small {
        width: 100px;            /* 更小的固定宽度 */
        flex: 0 0 auto;
        min-width: 0;
    }
    
    .flex-gallery {
        gap: 6px;                /* 间距也缩小 */
    }
}