MediaWiki:Gadget-hoverGallery.css

From ChimniWiki
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
.hover-gallery {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
  max-width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
}

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

.hover-gallery .alt-image {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

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

.hover-gallery .main-image {
  z-index: 0;
}