模板:跳脸/style.css:修订间差异

来自BinWiki
>OctoberSama
无编辑摘要
导入50个版本
 
(未显示1个用户的47个中间版本)
第1行: 第1行:
.fullscreen-image {
@keyframes zoomInThenHide {
   position: fixed;
   0% {
  top: 0;
    opacity: 0;
  left: 0;
    transform: translate(-50%, -50%) scale(0.01);
   width: 1px;
   }
   height: 1px;
   20% {
  transform: scale(0.01);
    opacity: 1;
   opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  transition: all 0.3s ease-out;
   }
   z-index: 9999;
  86.7% {
   background-color: black;
    opacity: 1;
  display: flex;
    transform: translate(-50%, -50%) scale(1);
  align-items: center;
   }
  justify-content: center;
   100% {
   overflow: hidden;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
   }
}
}


/* 显示并放大图片 */
.zoom-fullscreen {
.fullscreen-image.show {
  /* 定位、尺寸、动画等基础属性保持不变 */
   width: 100vw;
  position: fixed !important;
   height: 100vh;
  top: 50% !important;
   transform: scale(1);
  left: 50% !important;
   opacity: 1;
  transform: translate(-50%, -50%);
   width: 100vmax !important;
   height: 100vmax !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  animation: zoomInThenHide 1.5s ease-out forwards;
   z-index: 99999 !important;
 
  /* --- 默认行为 (针对竖屏/方屏) --- */
  background-size: cover !important;
}
 
/*
  --- 条件性覆盖 (针对横屏) ---
  当视口的宽高比大于 4/3 时,此规则生效
*/
@media (min-aspect-ratio: 4/3) {
   .zoom-fullscreen {
    /*
      让背景图的高度等于视口高度,宽度自动等比缩放
      这会精确地让图片高度占满屏幕
    */
    background-size: auto 100vh !important;
  }
}
}


/* 限制图片大小不变形 */
/* 折叠部分样式保持不变 */
.fullscreen-image img {
.mw-collapsible.mw-collapsed .zoom-fullscreen {
   max-width: 100%;
   visibility: hidden;
  max-height: 100%;
}
}

2025年9月16日 (二) 23:10的最新版本

@keyframes zoomInThenHide {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.01);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  86.7% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
}

.zoom-fullscreen {
  /* 定位、尺寸、动画等基础属性保持不变 */
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  width: 100vmax !important;
  height: 100vmax !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  animation: zoomInThenHide 1.5s ease-out forwards;
  z-index: 99999 !important;

  /* --- 默认行为 (针对竖屏/方屏) --- */
  background-size: cover !important;
}

/* 
  --- 条件性覆盖 (针对横屏) ---
  当视口的宽高比大于 4/3 时,此规则生效
*/
@media (min-aspect-ratio: 4/3) {
  .zoom-fullscreen {
    /* 
      让背景图的高度等于视口高度,宽度自动等比缩放
      这会精确地让图片高度占满屏幕 
    */
    background-size: auto 100vh !important;
  }
}

/* 折叠部分样式保持不变 */
.mw-collapsible.mw-collapsed .zoom-fullscreen {
  visibility: hidden;
}