Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android WebView-Modal一直滚动到顶部_Android_Css_Webview - Fatal编程技术网

Android WebView-Modal一直滚动到顶部

Android WebView-Modal一直滚动到顶部,android,css,webview,Android,Css,Webview,在这里尝试了解决方案,但不起作用 模式如下: <style> /* The Modal (background) */ .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 9999; /* Sit on top */ left: 0px; top: 0p

在这里尝试了解决方案,但不起作用

模式如下:

<style>
    /* The Modal (background) */
    .modal {
        display: none; /* Hidden by default */
        position: fixed; /* Stay in place */
        z-index: 9999; /* Sit on top */
        left: 0px;
        top: 0px;
        width: 100%; /* Full width */
        height: 100%; /* Full height */
        overflow: auto; /* Enable scroll if needed */
        background-color: rgb(0,0,0); /* Fallback color */
        background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    }

    /* Do not remove - Prevents android from jumping to top */
    body.modal-open {
        overflow: visible;
        position: fixed;
        width: 100%;
        height:100%;
    }

    /* Modal Content/Box */
    .modal-content {
        background-color: #fefefe;
        margin: 30% auto; /* 30% from the top and centered */
        padding: 0px;
        overflow-y:auto;
        border-radius: 10px;
        border: 0px;
        max-height:70%;
        width: 80%; /* Could be more or less, depending on screen size */
    }

    /* Modal Content/Box */
    .modal-image-content {
        z-index: 99999; /* Sit on top */
        padding: 0px;
        margin: auto; /*centered */
        border: 0px;
        max-height:100%;
        max-width:100%;
    }

    /* Links inside the dropdown */
    .modal-content a {
        color: black;
        padding: 10px;
        text-decoration: none;
        display: block;
    }

    /* Links inside the dropdown */
    .modal-content a:hover{
        background-color: #dddddd;
    }

    /* The Close Button */
    .close {
        color: #aaa;
        float: right;
        font-size: 28px;
        font-weight: bold;
    }

    .close:hover,
    .close:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
    }
</style>

/*模态(背景)*/
.莫代尔{
显示:无;/*默认情况下隐藏*/
位置:固定;/*保持原位*/
z指数:9999;/*位于顶部*/
左:0px;
顶部:0px;
宽度:100%;/*全宽*/
高度:100%;/*全高*/
溢出:自动;/*根据需要启用滚动*/
背景色:rgb(0,0,0);/*回退色*/
背景色:rgba(0,0,0,0.6);/*黑色w/不透明度*/
}
/*不删除-防止android跳到顶部*/
body.modal-open{
溢出:可见;
位置:固定;
宽度:100%;
身高:100%;
}
/*模态内容/框*/
.模态内容{
背景色:#fefe;
边距:30%自动;距顶部和居中30%*/
填充:0px;
溢出y:自动;
边界半径:10px;
边界:0px;
最大高度:70%;
宽度:80%;/*可能更多或更少,具体取决于屏幕大小*/
}
/*模态内容/框*/
.模态图像内容{
z索引:99999;/*位于顶部*/
填充:0px;
边距:自动;/*居中*/
边界:0px;
最大高度:100%;
最大宽度:100%;
}
/*下拉列表中的链接*/
.模态内容a{
颜色:黑色;
填充:10px;
文字装饰:无;
显示:块;
}
/*下拉列表中的链接*/
.模态内容a:悬停{
背景色:#dddddd;
}
/*关闭按钮*/
.结束{
颜色:#aaa;
浮动:对;
字号:28px;
字体大小:粗体;
}
.关闭:悬停,
.结束:聚焦{
颜色:黑色;
文字装饰:无;
光标:指针;
}
如您所见,
body.modal open
是从解决方案中获取的,但它不起作用


再说一遍,如何使模式停止使屏幕滚动到顶部?

这件事很奇怪,我的Google fu技能解决了它

改变