As planned, the model window should appear from the corner, and disappear, like a mouse not on an element of the model window, but my window just appeared, but after adding the condition, if nothing works,
<div id="enterModal"><img src="/img/open.png" width="15px" height="15px">Войти</div>
<div id="showModal">
<a href="/pablic/login.php">Log In</a>
<a href="/pablic/signup.php">Sign Up</a>
</div>
css
#enterModal{
position: relative;
}
#showModal{
display: none;
width: 300px;
height: 300px;
background: rgb(252, 254, 252);
position: absolute;
right: 0;
top: -10px;
z-index: 99999;
box-shadow: 0 0 15px gray;
border-radius: 10px;
transform: scale(0);
transition: .5s;
}
#showModal>a{
display: grid;
height: 40px;
width: 90px;
background: black;
border-radius: 5px;
color: white;
justify-items: center;
align-items: center;
margin: 0 auto;
margin-top: 30px;
}
javascript
enterModal.onclick = function () {
showModal.style.display = "block";
showModal.style.transform = "scale(1)";
if (showModal.onmouseover != showModal) {
showModal.style.display = "none";
}
}