Jquery 滚动条显示但不滚动

Jquery 滚动条显示但不滚动,jquery,Jquery,我正试图使响应弹出注册和登录表单。当网站在超小尺寸设备中打开时,一些表单文本不会显示。我想滚动覆盖,但不滚动。请帮忙。代码如下 Html jquery (function ($) { $.fn.extend({ leanModal: function (options) { var defaults = { top: 100, overlay: 0.5, closeButton: null

我正试图使响应弹出注册和登录表单。当网站在超小尺寸设备中打开时,一些表单文本不会显示。我想滚动覆盖,但不滚动。请帮忙。代码如下

Html

jquery

(function ($) {
$.fn.extend({
    leanModal: function (options) {
        var defaults = {
            top: 100,
            overlay: 0.5,
            closeButton: null
        };
        var overlay = $("<div id='lean_overlay'></div>");
        $("body").append(overlay);
        $("body").css({"overflow":"hidden"});
        $("#lean_overlay").css({"overflow-y":"scroll"});
        options = $.extend(defaults, options);
        return this.each(function () {
            var o = options;
            var modal_id = $(this).attr("href");

            function showModal() {
                $("#lean_overlay").click(function () {

                });
                $(o.closeButton).click(function () {
                    close_modal(modal_id)
                });

                var modal_height = $(modal_id).outerHeight();
                var modal_width = $(modal_id).outerWidth();



                $("#lean_overlay").fadeTo(200, o.overlay);

                $(modal_id).css({

                    "position": "fixed",
                    "opacity": 0,
                    "z-index": 1000,
                    "left": 50 + "%",
                    "margin-left": -(modal_width / 2) + "px",
                    "top": o.top + "px"
                });

                $(modal_id).fadeTo(200, 1);
            };

            $(document).ready(function () {
                showModal();
            });

            $(this).click(function (e) {
                showModal();
                e.preventDefault()
            })
        });

        function close_modal(modal_id) {
            $("#lean_overlay").fadeOut(200);
            $(modal_id).css({
                "display": "none"
            })
        }
    }
})
})(jQuery);
(函数($){
$.fn.extend({
leanModal:功能(选项){
var默认值={
前100名,
叠加:0.5,
关闭按钮:空
};
var overlay=$(“”);
$(“正文”)。附加(覆盖);
$(“body”).css({“溢出”:“隐藏”});
$(“#lean_overlay”).css({“overflow-y”:“scroll”});
选项=$.extend(默认值,选项);
返回此。每个(函数(){
var o=期权;
var modal_id=$(this.attr(“href”);
函数showmodel(){
$(“#精益覆盖”)。单击(功能(){
});
$(o.closeButton)。单击(函数(){
关闭模式(模式id)
});
var modal_height=$(modal_id).outerHeight();
var modal_width=$(modal_id).outerWidth();
美元(“#精益覆盖”)。法德托(200,o.overlay);
$(modal_id).css({
“位置”:“固定”,
“不透明度”:0,
“z指数”:1000,
“左”:50+“%”,
“左边距”:(模态_宽度/2)+“px”,
“顶部”:o.top+“px”
});
$(模态识别号).fadeTo(200,1);
};
$(文档).ready(函数(){
showModal();
});
$(此)。单击(函数(e){
showModal();
e、 预防默认值()
})
});
功能关闭模式(模式id){
美元(“#精益覆盖”)。淡出(200);
$(modal_id).css({
“显示”:“无”
})
}
}
})
})(jQuery);

您需要媒体查询来编辑您的CSW哪种媒体查询?没有人能解决这个问题???
    @import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,700italic,400italic);

body {font-family: 'Source Sans Pro', sans-serif; font-size: 14px; color: #666;}

#lean_overlay {

    position:fixed;
    z-index:100;
    top: 0px;
    left: 0px;
    height:100%;
    width:100%;
    background: #000;
    display: none;
    overflow-y:scroll;
}

.popupContainer{
    position:fixed;
    width:330px;
    height: auto;
    left:45%;
    top:80px;
    background: #FFF;
}

#modal_trigger {margin:auto; width:100px; display:block;}

.btn {padding:10px 20px; background: #F4F4F2;}
.btn_red {background: #ED6347; color: #FFF;}

.btn:hover {background: #E4E4E2;}
.btn_red:hover {background: #C12B05;}

a.btn {color:#666; text-align: center; text-decoration: none;}
a.btn_red {color: #FFF;}

.one_half {width:50%; display: block; float:left;}
.one_half.last {width:45%; margin-left:5%;}

/* Popup Styles*/
.popupHeader {font-size:16px; text-transform: uppercase;}
.popupHeader {background:#F4F4F2; position:relative; padding:10px 20px; border-bottom:1px solid #DDD; font-weight:bold;}
.popupHeader .modal_close {position: absolute; right: 0; top:0; padding:10px 15px; background:#E4E4E2; cursor: pointer; color:#aaa; font-size:16px;}

.popupBody {padding:20px;pos}


/* Social Login Form */
.social_login {}
.social_login .social_box {display:block; clear:both; padding:10px; margin-bottom: 10px; background: #F4F4F2; overflow: hidden;}
.social_login .icon {display:block; width:40px; padding:5px 10px; margin-right: 10px; float:left; color:#FFF; font-size:16px; text-align: center;} 
.social_login .fb .icon {background:#3B5998;}
.social_login .google .icon {background:#DD4B39;}
.social_login .icon_title {display:block; padding:5px 0; float:left; font-weight: bold; font-size: 16px; color:#777;}
.social_login .social_box:hover {background: #E4E4E2;}

.centeredText {text-align: center; margin: 20px 0; clear: both; overflow: hidden; text-transform: uppercase;}

.action_btns {clear:both; overflow: hidden;}
.action_btns a {display: block;}

/* User Login Form */
.user_login {display: none;}
.user_login label {display: block; margin-bottom:5px;}
.user_login input[type="text"], .user_login input[type="email"], .user_login input[type="password"] {display: block; width:90%; padding: 10px; border:1px solid #DDD; color:#666;}
.user_login input[type="checkbox"] {float:left; width:20%;}
.user_login input[type="checkbox"]+label {float:left;}
.user_login .checkbox {margin-bottom: 10px; clear: both; margin-right:5px;}
.forgot_password {display:block; margin: 20px 0 10px; clear: both; overflow: hidden; text-decoration: none; color:#ED6347;}
/* User Register Form */
.user_register {display: none;}
.user_register label {display: block; margin-bottom:5px;}
.user_register input[type="text"], .user_register input[type="email"], .user_register input[type="password"] {display: block; width:90%; padding: 10px; border:1px solid #DDD; color:#666;}
.user_register input[type="checkbox"] {float:left; margin-right:5px;}
.user_register input[type="checkbox"]+label {float:left;}

.user_register .checkbox {margin-bottom: 10px; clear: both; overflow: hidden;}
(function ($) {
$.fn.extend({
    leanModal: function (options) {
        var defaults = {
            top: 100,
            overlay: 0.5,
            closeButton: null
        };
        var overlay = $("<div id='lean_overlay'></div>");
        $("body").append(overlay);
        $("body").css({"overflow":"hidden"});
        $("#lean_overlay").css({"overflow-y":"scroll"});
        options = $.extend(defaults, options);
        return this.each(function () {
            var o = options;
            var modal_id = $(this).attr("href");

            function showModal() {
                $("#lean_overlay").click(function () {

                });
                $(o.closeButton).click(function () {
                    close_modal(modal_id)
                });

                var modal_height = $(modal_id).outerHeight();
                var modal_width = $(modal_id).outerWidth();



                $("#lean_overlay").fadeTo(200, o.overlay);

                $(modal_id).css({

                    "position": "fixed",
                    "opacity": 0,
                    "z-index": 1000,
                    "left": 50 + "%",
                    "margin-left": -(modal_width / 2) + "px",
                    "top": o.top + "px"
                });

                $(modal_id).fadeTo(200, 1);
            };

            $(document).ready(function () {
                showModal();
            });

            $(this).click(function (e) {
                showModal();
                e.preventDefault()
            })
        });

        function close_modal(modal_id) {
            $("#lean_overlay").fadeOut(200);
            $(modal_id).css({
                "display": "none"
            })
        }
    }
})
})(jQuery);