Navigation Disappearing in Chrome after scrolling and clicking(滚动并单击后,导航在 Chrome 中消失)
问题描述
我正在为我正在发布的 Android 应用程序开发一个小型网站,但我有一个小问题,我似乎无法找到答案.
I am working on a small website for an Android App I'm releasing, but I have a small problem that I can't seem to find the answer to.
在 Firefox 中,一切正常,但是当您滚动然后单击导航链接(只需使用 id 向下移动页面)但在 Chrome 上,导航会消失,直到您再滚动一些.
In Firefox, everything works properly but when you scroll and then click on a nav link (simply using an id to move down the page) but on Chrome, the navigation disappears until you scroll some more.
网站上线了www.ioudebtcalculator.com
这些是我应用的唯一样式:
These are the only styles I have applied:
#navBar {
background-color:#000;
position:fixed;
width:100%;
font-family:sans-serif;
font-weight:bold;
font-size:13pt;
height:70px;
}
我已经从网站上的导航栏中删除了固定位置,因此您将不再看到那里的问题.问题还没有解决.
I have since removed the position fixed from the navBar on the website so you will no longer see the problem there. The problem has not yet been solved.
您可以使用开发者工具或任何其他等效工具轻松地将固定位置添加到导航栏元素以查看问题.
You can easily add position fixed to the navBar element using Developer Tools or any other equivalent tool to see the problem.
推荐答案
将它添加到导航栏 css 时对我有用
it works for me when adding this to your navbar css
-webkit-transform: translateZ(0);
制作
#navBar {
background-color: #000;
width: 100%;
position: fixed;
font-family: sans-serif;
font-weight: bold;
font-size: 14pt;
height: 70px;
-webkit-transform: translateZ(0);
z-index: 1;
box-shadow: 0 2.5px 20px #000;
}
这篇关于滚动并单击后,导航在 Chrome 中消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:滚动并单击后,导航在 Chrome 中消失


基础教程推荐
- 有没有办法使用OpenLayers更改OpenStreetMap中某些要素 2022-09-06
- 角度Apollo设置WatchQuery结果为可用变量 2022-01-01
- 我什么时候应该在导入时使用方括号 2022-01-01
- 在 JS 中获取客户端时区(不是 GMT 偏移量) 2022-01-01
- 在for循环中使用setTimeout 2022-01-01
- 悬停时滑动输入并停留几秒钟 2022-01-01
- 动态更新多个选择框 2022-01-01
- 响应更改 div 大小保持纵横比 2022-01-01
- 当用户滚动离开时如何暂停 youtube 嵌入 2022-01-01
- Karma-Jasmine:如何正确监视 Modal? 2022-01-01