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

来自BinWiki
>OctoberSama
无编辑摘要
>OctoberSama
无编辑摘要
第2行: 第2行:
   0% {
   0% {
     opacity: 0;
     opacity: 0;
     transform: translate(-50%, -50%) scale(0.1);
     transform: scale(0.1);
   }
   }
   20% {
   20% {
     opacity: 1;
     opacity: 1;
     transform: translate(-50%, -50%) scale(3);
     transform: scale(1); /* 放大到1即可,因为div本身已经全屏 */
   }
   }
   86.7% {
   86.7% {
     opacity: 1;
     opacity: 1;
     transform: translate(-50%, -50%) scale(3);
     transform: scale(1);
   }
   }
   100% {
   100% {
     opacity: 0;
     opacity: 0;
     transform: translate(-50%, -50%) scale(0);
     transform: scale(0);
   }
   }
}
}
第20行: 第20行:
.zoom-fullscreen {
.zoom-fullscreen {
   position: fixed !important;
   position: fixed !important;
   top: 50% !important;
   top: 0;
   left: 50% !important;
   left: 0;
   width: auto !important;
   width: 100vw; /* 宽度 = 100% 视口宽度 */
   height: auto !important;
   height: 100vh; /* 高度 = 100% 视口高度 */
   max-width: 100vw !important;
 
   max-height: 100vh !important;
  /* --- 核心背景属性 --- */
   object-fit: contain !important;
   background-size: cover !important; /* 关键!保持比例铺满容器 */
   transform: translate(-50%, -50%) scale(0.1);
   background-position: center !important; /* 背景图居中显示 */
   background-repeat: no-repeat !important; /* 背景图不重复 */
 
  /* 动画和层级 */
   transform-origin: center; /* 确保从中心缩放 */
   animation: zoomThenHide 1.5s ease-out forwards;
   animation: zoomThenHide 1.5s ease-out forwards;
   z-index: 99999 !important;
   z-index: 99999 !important;
  display: block !important;
}
}


 
/* 这部分可以保持不变 */
.mw-collapsible.mw-collapsed .zoom-fullscreen {
.mw-collapsible.mw-collapsed .zoom-fullscreen {
   visibility: hidden;
   visibility: hidden;

2025年7月19日 (六) 17:13的版本

@keyframes zoomThenHide {
  0% {
    opacity: 0;
    transform: scale(0.1);
  }
  20% {
    opacity: 1;
    transform: scale(1); /* 放大到1即可,因为div本身已经全屏 */
  }
  86.7% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0);
  }
}

.zoom-fullscreen {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw; /* 宽度 = 100% 视口宽度 */
  height: 100vh; /* 高度 = 100% 视口高度 */

  /* --- 核心背景属性 --- */
  background-size: cover !important; /* 关键!保持比例铺满容器 */
  background-position: center !important; /* 背景图居中显示 */
  background-repeat: no-repeat !important; /* 背景图不重复 */
  
  /* 动画和层级 */
  transform-origin: center; /* 确保从中心缩放 */
  animation: zoomThenHide 1.5s ease-out forwards;
  z-index: 99999 !important;
}

/* 这部分可以保持不变 */
.mw-collapsible.mw-collapsed .zoom-fullscreen {
  visibility: hidden;
  opacity: 0;
}

.mw-collapsible:not(.mw-collapsed) .zoom-fullscreen {
  visibility: visible;
  opacity: 1;
}