打开/关闭菜单
40
311
27
1024
植物大战僵尸杂交版Wiki
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
本Wiki为杂交版民间Wiki,不对杂交版官方产生影响
Wiki制作组招募群号:633922116

MediaWiki:Common.css:修订间差异

MediaWiki界面页面
无编辑摘要
无编辑摘要
标签手工回退
 
(未显示同一用户的12个中间版本)
第1行: 第1行:
/* 电脑端样式 - 默认一行3个(大屏幕) */
/* 电脑端样式 */
.flex-gallery {
.responsive-two-columns .left-col {
     display: grid;
     width: 320px;
     grid-template-columns: repeat(3, 1fr);
     vertical-align: top;
     gap: 10px;
}
     align-items: flex-start;
.responsive-two-columns .right-col {
    vertical-align: top;
    padding-left: 20px;
}
 
/* 新增:响应式图片卡片样式 */
.gallery-card {
    position: relative;
    width: calc(50% - 5px); /* 一行两个,减去gap的一半 */
     max-width: 500px;
     text-align: center;
}
}


/* 所有卡片通用样式 */
.gallery-card,
.gallery-card-small {
.gallery-card-small {
     position: relative;
     position: relative;
     width: 100%;
     width: calc(50% - 5px);
    max-width: 150px;
     text-align: center;
     text-align: center;
}
}


/* 图片自动缩放 */
.gallery-card img,
.gallery-card img,
.gallery-card-small img {
.gallery-card-small img {
     width: 100%;
     width: 100%;
     height: auto;
     height: auto;
    max-width: 100%;
}
}


/* 文字覆盖层 */
.image-overlay {
.image-overlay {
     position: absolute;
     position: absolute;
第33行: 第39行:
     padding: 5px;
     padding: 5px;
     border-radius: 4px;
     border-radius: 4px;
    font-size: 14px;
}
}


/* 中等屏幕(1200px以下)改为一行2个 */
.flex-gallery {
@media screen and (max-width: 1200px) {
    display: flex;
     .flex-gallery {
     flex-wrap: wrap;
        grid-template-columns: repeat(2, 1fr);
    justify-content: flex-start;
     }
    gap: 10px;
     align-items: flex-start;
}
}


/* 平板端(900px以下)保持一行2个 */
/* 手机端样式 */
@media screen and (max-width: 900px) {
    .flex-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
 
/* 手机端样式(768px以下) */
@media screen and (max-width: 768px) {
@media screen and (max-width: 768px) {
     .responsive-two-columns,
     .responsive-two-columns,
第66行: 第64行:
     }
     }
      
      
     .flex-gallery {
     .responsive-two-columns img {
         grid-template-columns: repeat(2, 1fr);
         max-width: 100%;
         gap: 8px;
        height: auto;
    }
   
    /* 手机端保持一行两个 */
    .gallery-card,
    .gallery-card-small {
        width: calc(50% - 5px);
         max-width: none;
     }
     }
      
      
     .image-overlay {
     .flex-gallery {
         bottom: 15px;
         gap: 10px;
        left: 5px;
        font-size: 12px;
        padding: 3px 5px;
     }
     }
}
}


/* 超小屏幕(500px以下)改为一行1个 */
/* 超小屏幕(宽度小于480px)时改为一行一个 */
@media screen and (max-width: 500px) {
@media screen and (max-width: 480px) {
     .flex-gallery {
     .gallery-card,
        grid-template-columns: 1fr;
    .gallery-card-small {
         gap: 10px;
         width: 100%;
     }
     }
}
}

2026年4月25日 (六) 09:27的最新版本

/* 电脑端样式 */
.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);  /* 一行两个,减去gap的一半 */
    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: calc(50% - 5px);
        max-width: none;
    }
    
    .flex-gallery {
        gap: 10px;
    }
}

/* 超小屏幕(宽度小于480px)时改为一行一个 */
@media screen and (max-width: 480px) {
    .gallery-card,
    .gallery-card-small {
        width: 100%;
    }
}