mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-05-21 02:44:55 +00:00
The process of suffering ended, fixed flyout scripts
This commit is contained in:
parent
dc80b37790
commit
f8585feb25
4 changed files with 112 additions and 71 deletions
|
@ -1,20 +1,14 @@
|
|||
let show = document.querySelectorAll(".flyout-display");
|
||||
let hide = document.querySelector(".flyout-close");
|
||||
|
||||
show.forEach((pain) => {
|
||||
pain.addEventListener("click", function(){
|
||||
document.querySelector("html").style.overflow= "hidden";
|
||||
|
||||
document.querySelector(".flyout").style.transform= "translateX(-50%) scale(1)";
|
||||
document.querySelector(".flyout").style.bottom= "-1rem";
|
||||
document.querySelector(".flyout-dim").style.display= "block";
|
||||
});
|
||||
show.forEach(function(){
|
||||
document.querySelector(".flyout").style.transform= "translateX(-50%) scale(1)";
|
||||
document.querySelector(".flyout").style.bottom= "-1rem";
|
||||
document.querySelector(".flyout-dim").style.display= "block";
|
||||
});
|
||||
|
||||
|
||||
hide.addEventListener("click", function(){
|
||||
document.querySelector("html").style.overflow= "auto";
|
||||
|
||||
document.querySelector(".flyout").style.transform= "translateX(-50%) scale(0.8)";
|
||||
document.querySelector(".flyout").style.bottom= "-20rem";
|
||||
document.querySelector(".flyout-dim").style.display= "none";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue