gpt4 book ai didi

html - 滚动条不会在移动设备上完全向下滚动页面

转载 作者:行者123 更新时间:2023-11-27 23:31:52 24 4
gpt4 key购买 nike

直接进入问题:我正在 HTML 和 CSS 上开发侧边栏菜单。在计算机设备上一切正常,但在移动设备上,页面不会滚动到页面末尾。我不知道问题出在哪里,但我会提供我编写的代码,以便有人可以帮助我解决这个问题。

HTML 部分

<div class="sidemenu">
<div class="topmenu">
/* The rest of the code
</div>
<div class="menucontent">
/* The rest of the code
</div>
</div>

CSS 部分

.sidemenu {
position: fixed;
width: 400px;
height: 100vh;
left: 0;
background-color: #FFFFFF;
transition: all 0.3s ease-in-out;
z-index: 1;
}
.topmenu {
width: 100%;
height: 84px;
border-bottom: 1px solid #000;
}
.menucontent {
position: relative;
width: 100%;
min-height: calc(100% - 84px);
max-height: calc(100% - 84px);
overflow-y: auto;
padding: 15px;
}

最佳答案

我修好了。我刚刚将 height: 100vh 从侧边栏替换为 100%

关于html - 滚动条不会在移动设备上完全向下滚动页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57449769/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com