当按下关闭按钮时,我试图淡出全屏覆盖和信息框 div,由于某种原因,下面的代码不起作用。提前感谢您的帮助,我是 JQuery 的菜鸟!
CSS:
.full_page_overlay {
width: 100%;
height: 100%;
position: fixed;
top: 0px;
left: 0px;
background: #626262;
opacity: 0.9;
z-index: 2147483646;
}
.cart_over {
width: 60%;
height: 60%;
margin-top: 20%;
margin-left: 20%;
position: fixed;
float: left;
border: 1px solid black;
box-shadow: 1px 1px 10px black;
background: white;
z-index: 2147483647;
border-radius: 10px;
}
HTML:
<div class="full_page_overlay"></div>
<div class="cart_over">
<a href="#" id="close_box">Close</a>
</div>
jQuery:
$( document ).ready(function() {
$("#close_box").click(function(){
$("#full_page_overlay").fadeOut();
$("#cart_over").fadeOut();
})
});