MediaWiki:Common.css: Difference between revisions

From ChimniWiki
Jump to navigation Jump to search
(Created page with "→‎CSS placed here will be applied to all skins: .hover-gallery { position: relative; overflow: hidden; display: inline-block; } .hover-gallery img { width: 100%; height: auto; display: block; transition: opacity 0.3s ease-in-out; } .hover-gallery .alt-image { position: absolute; top: 0; left: 0; opacity: 0; pointer-events: none; } .hover-gallery:hover .alt-image { opacity: 1; pointer-events: auto; }")
 
No edit summary
Line 20: Line 20:
   opacity: 0;
   opacity: 0;
   pointer-events: none;
   pointer-events: none;
  animation: altCycle 4s infinite;
}
}


Line 25: Line 26:
   opacity: 1;
   opacity: 1;
   pointer-events: auto;
   pointer-events: auto;
}
@keyframes altCycle {
  0%, 33% {
    opacity: 1;
    z-index: 2;
  }
  34%, 66% {
    opacity: 0;
    z-index: 1;
  }
  67%, 100% {
    opacity: 0;
    z-index: 1;
  }
}
.hover-gallery .alt-image:nth-of-type(3) {
  animation-delay: 0s;
}
.hover-gallery .alt-image:nth-of-type(4) {
  animation-delay: 1.3s;
}
.hover-gallery .alt-image:nth-of-type(5) {
  animation-delay: 2.6s;
}
}

Revision as of 11:51, 31 July 2025

/* CSS placed here will be applied to all skins */

.hover-gallery {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.hover-gallery img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease-in-out;
}

.hover-gallery .alt-image {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  animation: altCycle 4s infinite;
}

.hover-gallery:hover .alt-image {
  opacity: 1;
  pointer-events: auto;
}

@keyframes altCycle {
  0%, 33% {
    opacity: 1;
    z-index: 2;
  }
  34%, 66% {
    opacity: 0;
    z-index: 1;
  }
  67%, 100% {
    opacity: 0;
    z-index: 1;
  }
}

.hover-gallery .alt-image:nth-of-type(3) {
  animation-delay: 0s;
}
.hover-gallery .alt-image:nth-of-type(4) {
  animation-delay: 1.3s;
}
.hover-gallery .alt-image:nth-of-type(5) {
  animation-delay: 2.6s;
}