Javascript 将div填充为弹出问题

Javascript 将div填充为弹出问题,javascript,jquery,html,css,Javascript,Jquery,Html,Css,我正在使用java脚本将div显示为弹出窗口。我在加载页面5秒后加载此弹出窗口。但是当我关闭弹出窗口时,div被关闭,但在关闭弹出窗口div后,我无法上下滚动 请查找以下代码: <div id="outer-popup" style="position: absolute; left: 0; top: -10px; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.75); display: none; z-index: 100

我正在使用java脚本将div显示为弹出窗口。我在加载页面5秒后加载此弹出窗口。但是当我关闭弹出窗口时,div被关闭,但在关闭弹出窗口div后,我无法上下滚动

请查找以下代码:

<div id="outer-popup"
 style="position: absolute; left: 0; top: -10px; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.75); display: none; z-index: 10000">
<div class="popup" id="popUpWrapper">

    <div class="popupContainer" style="padding:0 0 0 10px;">


        <div class="popupClose" id="popupclose" style="float:right;width:auto;">
            <a href="#" class="pClose"><img
                    src="/img/src/ex.jpg"></a>
        </div> 



        <form:form modelAttribute="dataForm" id="data_form" name="dataForm" 
                   method="post" action="/dataAction" >

            FORM DATA TO SUBMIT
        </form:form>
    </div>
</div>
请纠正我,并就如何纠正这一点提供建议。谢谢。

看看这个:

$('body').css('overflow', 'hidden');
这正是阻碍你身体滚动的原因

在关闭时,请执行以下操作:

$("#popupclose").click(function () {

    $("#outer-popup").css("display", "none");
('body').css('overflow', 'scroll');
});

完美的非常感谢您的快速回复@Alvaro Touzon您正在showPopup中设置CSS样式,单击后不会恢复。
$("#popupclose").click(function () {

    $("#outer-popup").css("display", "none");
('body').css('overflow', 'scroll');
});