css - 向下滚动然后再次向上滚动时,顶部栏重叠标题 Wordpress
问题描述
这是我的顶栏:https ://nationalvip.pixl.work/
顶部栏位于标题上方,目前看起来不错。
当您向下滚动和向上滚动时,问题来了,蓝色的顶部栏将与标题重叠并且看起来很糟糕。
这是我的CSS:
.top-bar-new {
position: absolute;
z-index: 9999999;
top: 0;
height: 30px;
width: 100%;
max-width: 1800px;
background-color: #164166;
color: #fff;
text-align: center
}
解决方案
不确定这是否正是您要寻找的,但我解决了。将此添加到您的 CSS 中(或在您的 CSS 中找到它并将 'top' 更改为此):
#autohide-header.fixed {
top: 30px;
}
然后改变position: absolute;
你.top-bar-new
的position: fixed;
推荐阅读
- dji-sdk - 如何在移动平台上设计一个访问多个地点并在每个地点处理一些计算机视觉任务的任务?
- python - 使用 Python 或工具将许多文件移动到多个子文件夹中
- javascript - 在反应类组件中,为什么在按钮单击的第一个实例中状态没有改变?但在第二种情况下,它会更新吗?
- symfony - Symfony 身份验证:为什么用户密码没有在 TokenInterface 中序列化
- python - 为我的社交网络应用程序个性化新闻提要
- scala - 如何将正则表达式解析为整个 spark 数据框而不是每一列?
- excel - 'double.TryParse(string, out double)' 的最佳重载方法匹配有一些无效参数
- angular - 在运行时更改角度材料日期选择器日期格式
- r - 使用 dplyr 获取每组或每行具有特定值的第一列的索引
- python - 在 spark 中自动将 json 放入数据帧