【发布时间】:2020-02-26 08:38:24
【问题描述】:
当浏览器导航栏显示时,我的网站移动导航栏滚动到可查看区域之外时遇到问题。我已经尝试了一些方法来修复它,但我似乎无法让它正常工作。
向下滚动之前:
向下滚动后:
我与导航栏相关的 SCSS 摘录:
nav {
display: flex;
flex-direction: column;
float: left;
background-color: #3a3e4b;
height: 100%;
width: 100px;
position: fixed;
}
// body also switches flex direction to put the nav bar at the bottom.
@media only screen and (max-width: 720px) {
nav {
flex-direction: row;
height: 70px;
width: 100%;
}
}
此处提供完整的 SCSS:https://github.com/CorruptComputer/CorruptComputer.GitHub.io/blob/master/assets/css/main.scss
我查看了这些,但似乎都没有帮助:
【问题讨论】:
-
在导航样式中添加 'bottom:0'。