【发布时间】:2021-07-12 21:02:00
【问题描述】:
我正在处理希望使整个页面可滚动的网页,当我在 html 标记上添加 overflow-y:scroll 时,它在 Chrome 浏览器中可以完美运行,但在 Edge 和 Firefox 中却不行。
我该如何解决这个问题?
这是 index.html
{% extends 'base.html' %}
{% block content %}
<div class="container-fluid">
<div class="col-md-auto col-sm-auto col-lg-auto position-relative mx-auto">
<h1 class="postmod">მოგესალმებით ციფრული ლიტერატურის
პორტალზე</h1>
</div>
</div>
<div class="container-fluid mainnews">
<div class="col-md-auto col-sm-auto col-lg-auto position-relative">
<h2 class="postmod">სიახლეები</h2>
{% for new in news %}
<h4>{{ new.title }}</h4>
<p>{{ new.message }}</p>
{% endfor %}
</div>
</div>
{% endblock %}
这是master.css文件
html {
min-height: 0px;
height: 100%;
width: 100%;
background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
position: fixed;
overflow:scroll;
}
body{
background-color: transparent;
color: #0d6efd;
overflow-y:scroll;
height: 100%;
min-height: 0px;
}
【问题讨论】:
-
请在您的问题中提供足够的示例代码,以便我们自己查看问题。
-
按要求添加伴侣????
-
您使用的是哪个版本的 Edge?我用你的代码做测试,把一些段落放在'
'中,它在所有浏览器中都运行良好。 Edge 和 Chrome 没有区别,都可以很好地滚动。请提供可以重现问题的code snippet。
标签: html css scrollbar overflow microsoft-edge