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

MediaWiki:Common.css:修订间差异

MediaWiki界面页面
无编辑摘要
无编辑摘要
标签手工回退
 
(未显示2个用户的71个中间版本)
第1行: 第1行:
/* 电脑端样式 - 默认一行2个(非全宽窗口) */
/* 电脑端样式 */
.flex-gallery {
.responsive-two-columns .left-col {
     display: grid;
     width: 320px;
     grid-template-columns: repeat(2, 1fr);  /* 默认一行2个 */
     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;
}
}


/* 全宽/超大屏幕(1400px以上)改为一行3个 */
.flex-gallery {
@media screen and (min-width: 1400px) {
    display: flex;
    .flex-gallery {
     flex-wrap: wrap;
        grid-template-columns: repeat(3, 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以下) */
/* === 手机端响应式(768px以下) === */
@media screen and (max-width: 768px) {
@media screen and (max-width: 768px) {
    /* 两栏布局变单栏 */
     .responsive-two-columns,
     .responsive-two-columns,
     .responsive-two-columns tbody,
     .responsive-two-columns tbody,
第66行: 第65行:
     }
     }
      
      
     .flex-gallery {
     .responsive-two-columns img {
         grid-template-columns: repeat(2, 1fr);
         max-width: 100%;
         gap: 8px;
         height: auto;
     }
     }
      
      
     .image-overlay {
    /* 画廊卡片保持一行两个 */
         bottom: 15px;
    .gallery-card,
        left: 5px;
     .gallery-card-small {
         font-size: 12px;
         width: calc(50% - 5px);
        padding: 3px 5px;
         max-width: none;
     }
     }
   
    /* PVZ导航:改为Flex布局,一行三个 */
    .pvz-navigation {
        float: none;
        max-width: 100%;
        width: 100%;
    }
   
    .pvz-navigation .nav-table {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        width: 100%;
    }
   
    .pvz-navigation .nav-table tbody {
        display: contents;  /* 关键!让tbody不影响flex布局 */
    }
   
    .pvz-navigation .nav-table tr {
        display: contents;  /* 关键!让tr不影响flex布局 */
    }
   
    .pvz-navigation .nav-table td {
        display: block;
        flex: 0 0 calc(33.33% - 5px);  /* 固定宽度一行三个 */
        width: auto !important;
        padding: 4px;
        box-sizing: border-box;
    }
   
    .pvz-navigation .nav-table td img {
        width: 100%;
        max-width: 120px;
        height: auto;
    }
   
    .pvz-navigation .nav-title {
        font-size: 1.2em;
    }
}
/* 超小屏幕(宽度小于480px)时改为一行一个 */
@media screen and (max-width: 480px) {
    .gallery-card,
    .gallery-card-small {
        width: 100%;
    }
}
/* 只有带链接且不在card/轮播内的图片才有悬停放大效果 */
a img {
    transition: transform 0.3s ease;
}
a img:hover {
    transform: scale(1.08);
    z-index: 10;
    position: relative;
}
/* 精确排除card模板和轮播图 - 不使用慢速选择器 */
.card a img,
.swiper a img,
.carousel a img,
.slider a img,
.owl-carousel a img,
.flexslider a img {
    transition: none;
}
}


/* 超小屏幕(500px以下)改为一行1个 */
.card a img:hover,
@media screen and (max-width: 500px) {
.swiper a img:hover,
     .flex-gallery {
.carousel a img:hover,
        grid-template-columns: 1fr;
.slider a img:hover,
         gap: 10px;
.owl-carousel a img:hover,
.flexslider a img:hover {
    transform: none;
}
/* === 表格响应式:电脑一行5个,手机自动换行 === */
 
/* 电脑端:保持原样,固定5列 */
@media screen and (min-width: 769px) {
  .responsive-fixed-grid {
    width: auto;
    margin: 0 auto;
    table-layout: fixed;
  }
 
  .responsive-fixed-grid td {
    width: 20%;
    padding: 5px;
    text-align: center;
    box-sizing: border-box;
  }
 
  .responsive-fixed-grid td img {
    max-width: 100%;
    height: auto;
  }
}
 
/* 手机端:表格变成弹性布局,自动换行 */
@media screen and (max-width: 768px) {
  .responsive-fixed-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    width: 100%;
  }
 
  .responsive-fixed-grid tbody,
  .responsive-fixed-grid tr {
     display: contents;
  }
 
  .responsive-fixed-grid td {
    display: block;
    flex: 0 1 auto;
    max-width: calc(33.33% - 6px);
    width: auto;
    padding: 3px;
    text-align: center;
    box-sizing: border-box;
  }
 
  .responsive-fixed-grid td img {
    max-width: 100%;
    height: auto;
    display: block;
  }
}
 
/* 更小屏幕:一行2个 */
@media screen and (max-width: 480px) {
  .responsive-fixed-grid td {
    max-width: calc(50% - 5px);
  }
}
.responsive-img {
    width: 100%;
    height: auto;
    max-width: 750px;
}
/* 让所有图片都能响应式缩放 */
img {
    max-width: 100%;
    height: auto;
}
.responsive-two-columns {
    padding-left: 50px;
    box-sizing: border-box;
}
 
@media screen and (max-width: 768px) {
    .responsive-two-columns {
        padding-left: 0 !important;
    }
}
/* === 首页表格左偏移(仅电脑端)=== */
@media screen and (min-width: 769px) {
    .responsive-two-columns {
         margin-left: -50px !important;
     }
     }
}
}
.responsive-img img {
    max-width: 100%;
    height: auto;
}
/* 等级颜色 */
.bronze-user  { color: #CD7F32 !important; font-weight: bold; }
.silver-user  { color: #0000FF !important; font-weight: bold; }
.platinum-user { color: #EE82EE !important; font-weight: bold; }
.gold-user    { color: #FFD700 !important; font-weight: bold; }
.rainbow-user  { color: #FFD700 !important; font-weight: bold; }
/* 状态圆点 */
.user-status-dot {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; margin-left: 4px; vertical-align: middle;
}
.status-online  { background-color: #4CAF50; }
.status-away    { background-color: #FF9800; }
.status-offline { background-color: #9E9E9E; }
/* 师徒标签 */
.user-tag {
    display: inline-block; font-size: 0.75em; padding: 0px 4px;
    margin-left: 4px; border-radius: 3px; vertical-align: middle;
    font-weight: normal;
}
.user-tag-mentor { background: #4CAF50; color: white; }
.user-tag-newbie { background: #FF9800; color: white; }
/* 等级图标 */
.user-level-icons {
    margin-left: 2px; font-size: 0.9em; vertical-align: middle;
    white-space: nowrap;
}
/* 卡片筛选隐藏 */
.pvzhe-card.hidden-card { display: none; }

2026年6月1日 (一) 13:21的最新版本

/* 电脑端样式 */
.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;
}

/* === 手机端响应式(768px以下) === */
@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;
    }
    
    /* PVZ导航:改为Flex布局,一行三个 */
    .pvz-navigation {
        float: none;
        max-width: 100%;
        width: 100%;
    }
    
    .pvz-navigation .nav-table {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        width: 100%;
    }
    
    .pvz-navigation .nav-table tbody {
        display: contents;  /* 关键!让tbody不影响flex布局 */
    }
    
    .pvz-navigation .nav-table tr {
        display: contents;  /* 关键!让tr不影响flex布局 */
    }
    
    .pvz-navigation .nav-table td {
        display: block;
        flex: 0 0 calc(33.33% - 5px);  /* 固定宽度一行三个 */
        width: auto !important;
        padding: 4px;
        box-sizing: border-box;
    }
    
    .pvz-navigation .nav-table td img {
        width: 100%;
        max-width: 120px;
        height: auto;
    }
    
    .pvz-navigation .nav-title {
        font-size: 1.2em;
    }
}

/* 超小屏幕(宽度小于480px)时改为一行一个 */
@media screen and (max-width: 480px) {
    .gallery-card,
    .gallery-card-small {
        width: 100%;
    }
}
/* 只有带链接且不在card/轮播内的图片才有悬停放大效果 */
a img {
    transition: transform 0.3s ease;
}

a img:hover {
    transform: scale(1.08);
    z-index: 10;
    position: relative;
}

/* 精确排除card模板和轮播图 - 不使用慢速选择器 */
.card a img,
.swiper a img,
.carousel a img,
.slider a img,
.owl-carousel a img,
.flexslider a img {
    transition: none;
}

.card a img:hover,
.swiper a img:hover,
.carousel a img:hover,
.slider a img:hover,
.owl-carousel a img:hover,
.flexslider a img:hover {
    transform: none;
}
/* === 表格响应式:电脑一行5个,手机自动换行 === */

/* 电脑端:保持原样,固定5列 */
@media screen and (min-width: 769px) {
  .responsive-fixed-grid {
    width: auto;
    margin: 0 auto;
    table-layout: fixed;
  }
  
  .responsive-fixed-grid td {
    width: 20%;
    padding: 5px;
    text-align: center;
    box-sizing: border-box;
  }
  
  .responsive-fixed-grid td img {
    max-width: 100%;
    height: auto;
  }
}

/* 手机端:表格变成弹性布局,自动换行 */
@media screen and (max-width: 768px) {
  .responsive-fixed-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    width: 100%;
  }
  
  .responsive-fixed-grid tbody,
  .responsive-fixed-grid tr {
    display: contents;
  }
  
  .responsive-fixed-grid td {
    display: block;
    flex: 0 1 auto;
    max-width: calc(33.33% - 6px);
    width: auto;
    padding: 3px;
    text-align: center;
    box-sizing: border-box;
  }
  
  .responsive-fixed-grid td img {
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* 更小屏幕:一行2个 */
@media screen and (max-width: 480px) {
  .responsive-fixed-grid td {
    max-width: calc(50% - 5px);
  }
}
.responsive-img {
    width: 100%;
    height: auto;
    max-width: 750px;
}
/* 让所有图片都能响应式缩放 */
img {
    max-width: 100%;
    height: auto;
}
.responsive-two-columns {
    padding-left: 50px;
    box-sizing: border-box;
}

@media screen and (max-width: 768px) {
    .responsive-two-columns {
        padding-left: 0 !important;
    }
}
/* === 首页表格左偏移(仅电脑端)=== */
@media screen and (min-width: 769px) {
    .responsive-two-columns {
        margin-left: -50px !important;
    }
}
.responsive-img img {
    max-width: 100%;
    height: auto;
}
/* 等级颜色 */
.bronze-user   { color: #CD7F32 !important; font-weight: bold; }
.silver-user   { color: #0000FF !important; font-weight: bold; }
.platinum-user { color: #EE82EE !important; font-weight: bold; }
.gold-user     { color: #FFD700 !important; font-weight: bold; }
.rainbow-user  { color: #FFD700 !important; font-weight: bold; }

/* 状态圆点 */
.user-status-dot {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; margin-left: 4px; vertical-align: middle;
}
.status-online  { background-color: #4CAF50; }
.status-away    { background-color: #FF9800; }
.status-offline { background-color: #9E9E9E; }

/* 师徒标签 */
.user-tag {
    display: inline-block; font-size: 0.75em; padding: 0px 4px;
    margin-left: 4px; border-radius: 3px; vertical-align: middle;
    font-weight: normal;
}
.user-tag-mentor { background: #4CAF50; color: white; }
.user-tag-newbie { background: #FF9800; color: white; }

/* 等级图标 */
.user-level-icons {
    margin-left: 2px; font-size: 0.9em; vertical-align: middle;
    white-space: nowrap;
}

/* 卡片筛选隐藏 */
.pvzhe-card.hidden-card { display: none; }