index.php file).
homepage
#overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
#popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80vw;
height: 90vh;
background-color: white;
z-index: 1;
}
#popup-iframe {
width: 100%;
height: 100%;
}
#popup-iframe2 {
width: 100%;
height: 100%;
}
button {
color: #0000ff;
border: none;
}
button:hover {
color: #add8e6;
}
Welcome!
- Filename
modeler/modeler.htm
account/upload.php
const form = document.getElementById("popup-button");
const overlay = document.getElementById("overlay");
const popup = document.getElementById("popup");
form.addEventListener("click", function () {
overlay.style.display = "block";
popup.style.display = "block";
});
overlay.addEventListener("click", function () {
overlay.style.display = "none";
popup.style.display = "none";
});
Подробнее здесь: https://stackoverflow.com/questions/769 ... -it-should
Мобильная версия