So, I have this box with a shadow, but when I close the window and it hides, another shadow is left behind. I cannot solve this problem, and I cannot say where it came from. I attached the code that I had with it, all in files and folders. I think this is a html error, but could also be a css error. Run this in a browser other than Google Chrome, because it may not load properly.
function popupClose() {
$('#popup').hide();
}
$(function() {
$('#content').text(myFunction());
});
function validate() {
var x = $('#in').val();
if (navigator.userAgent.indexOf("Chrome") != -1) {
$('.popup').css("display", "none");
} else {
$('.popup').load('html/popuphtml.html');
}
}
window.onload = validate;
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
transition: opacity 500ms;
visibility: visible;
transition: all 600ms ease-in-out;
}
.overlay:target {
visibility: visible;
opacity: 1;
}
.popup {
-moz-margin: 70px auto;
-moz-padding: 15px;
background: #eee;
border-radius: 8px;
-moz-width: 30%;
text-align: center;
box-shadow: 0 0 90px 80px #eee;
z-index: 1;
position: relative;
transition: all 600ms ease-in-out;
}
.popup h2 {
margin-top: 0;
color: #333;
font-family: Tahoma, Arial, sans-serif;
text-align: center;
}
.popup .close {
position: absolute;
top: 10px;
right: 20px;
transition: all 200ms;
font-size: 30px;
font-weight: bold;
text-decoration: none;
color: #555;
}
.popup .close:hover {
color: #B00B0B;
text-shadow: 0 0 3px #B00B0B;
}
.popup .content {
max-height: 30%;
overflow: auto;
text-align: center;
}
@media screen and (max-width: 700px) {
.box {
width: 70%;
}
.popup {
width: 70%;
}
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="popup">
<h3>Loading...</h3>
</div>
<div id="popup" class="overlay">
<div class="popup">
<h3>Your browser at the moment is not supported for this website. Please use Chrome.</h3>
<a class="close" href="javascript:popupClose();">×</a>
</div>
</div>
Run codeHide result
source
share