User:Saag/common.css

From Deadlock Wiki
Revision as of 18:40, 6 September 2024 by Saag (talk | contribs)
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.
/* Ensure the parent container is positioned relative */
.hover-wrapper {
  position: relative; /* Establishes a reference point for the absolute positioning of child elements */
}

/* The hover element */
.hover-to-show {
  cursor: pointer;
}

/* The hidden overlay */
.hide {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  position: absolute; /* Position absolute to overlay without shifting other content */
  top: 100%; /* Position it below the hover element, adjust as necessary */
  left: 0; /* Align it horizontally, adjust if needed */
  z-index: 2; /* Ensure it appears above other content */
  cursor: pointer;
}

/* Display the overlay on hover */
.hover-to-show:hover + .hide {
  display: block;
  opacity: 1;
}