导航在滚动和点击后在Chrome中消失 [英] Navigation Disappearing in Chrome after scrolling and clicking

查看:112
本文介绍了导航在滚动和点击后在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;
}

编辑:我已经删除了navBar在网站上固定的位置你不会再看到那里的问题。

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.

您可以使用开发人员工具或任何其他类似工具轻松地将位置固定到navBar元素,以查看问题。

You can easily add position fixed to the navBar element using Developer Tools or any other equivalent tool to see the problem.

推荐答案

它适用于我添加到您的navbar 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中消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆