I'm facing an issue where the loading animation I want to display after a user action is appearing greyed out along with the background, when I only want the background to be greyed out. The white box should be opaque but is displaying some transparency as well. Can anyone assist with this problem?
$('input[type=button]').click(function() {
$("#shader").fadeIn();
});
.loadingContainer {
width: 50%;
height: 50%;
overflow: auto;
margin: auto;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.shader {
width: 100%;
height: 100%;
background-color: black;
top: 0;
bottom: 0;
right: 0;
left: 0;
position: fixed;
opacity: 0.5;
display: none;
}
#divLoading3 {
border-radius: 40px;
margin: auto;
overflow: hidden;
width: 100%;
height: 100%;
background-color: white;
}
... (additional CSS code)
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
... (more keyframes)
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="button" value="load button">
<p>background contents background contents background contents</p>
... (additional HTML code)
For a better view, check out the full page.