fix: 修复手机看的时候,点开左边侧边栏,点空白的地方不会隐藏的bug

This commit is contained in:
2020-07-15 14:44:27 +08:00
parent 3f8396a254
commit 47fad8167a
3 changed files with 107 additions and 21 deletions

View File

@ -34,7 +34,7 @@ window.onload = function () {
currentPosition > window.screen.availHeight ? top.style.display = 'block' : top.style.display = 'none'
// 左部导航自动浮动
if (currentPosition > floatTop) {
if (currentPosition > floatTop && document.body.clientWidth > 768) {
document.getElementById('navication').style.position = 'fixed'
} else {
document.getElementById('navication').style.position = 'static'