User:Saag/common.css: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Saag (talk | contribs)
No edit summary
Tag: Manual revert
Saag (talk | contribs)
No edit summary
Line 1: Line 1:
/* 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 {
.hide {
   display: none;
   display: none;
   opacity: 0;
   opacity: 0;
   transition: opacity 0.5s ease;
   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 {
.hover-to-show:hover + .hide {
display: block;
  display: block;
    position: fixed;
  opacity: 1;
    top: inherit;
z-index: 2;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.5s ease;
}
}

Revision as of 18:40, 6 September 2024

/* 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;
}