When you need to implement the following figure, click on the service score, a Service Rating window appears to fill in the relevant form information
But this will let us Open the service scoring interface can also click on the body main interface of the shopping cart links, this is wrong, so we can use cascading style sheet to specify the perimeter div z-index below the current service Rating form page, can not be clicked, as follows:
/* Define a div to cover the entire page, the z-index of this div is larger than the body, less than the service rating div
/#temp {
background-color: #000;
opacity:0.3;
width:100%;
height:100%;
Z-index:2;
Visibility:hidden;
}
/* Rating Div, its z-index max (when displayed)/
#mark {
Background-color:rgb (255,255,255);
width:400px;
height:250px;
Z-index:3;
Visibility:hidden;
}
* * Contains the service rating, shopping cart, such as div * * * *
#main {
Background-color:rgb (255,255,255);
width:100%;
height:100%;
z-index:1;
}
<div id= "Temp" ></div>
<div id= "Mark" ></div>
<div id= "main" ></div>
<a id= "link" ><i> click me to Cascade </a>
<script>
window.onload = function () {
document.getElementById ("link"). onclick = function () {
document.getElementById ("temp"). Style.visibility = " Visible ";
document.getElementById ("Mark"). style.visibility = "visible";
}
}
</script>
The effect chart is as follows:
The above is a small series to introduce the introduction of the JS based on the implementation of a hidden div window of the body page into a gray and can not be edited, I hope to help everyone, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!