twitter-bootstrap - 覆盖元素 Z-index
问题描述
我是新手。我的网站具有以下结构
<nav class="navbar fixed-top" id="mainNav">>
<div class="container">
//stuff goes here
</div>
</nav>
<section id="signup" class="signup-section">
<div class="container">
//stuff goes here
<form class="form-inline d-flex">
//stuff goes here
</form>
</div>
</section>
然后我在导航栏上进行了以下 z 索引更改
.container
{
position:relative;
}
.navbar
{
z-index:9;
}
.signup-section{
z-index:1;
}
.form-inline{
z-index:1;
}
然而,当我向下滚动时,导航栏仍在注册部分/表单内联下方
解决方案
推荐阅读
- python - 如何通过命令行或使用 python 库获取在 Windows 上运行的进程的音频级别?
- prolog - prolog中没有和没有call/2的目标有什么区别?
- swift - 我可以在 SwiftUI 应用程序中使用 View Controller (CalendarKit) 吗?
- c++ - 如果本地 std::function 超出其“生命”,是否有任何问题?
- python - 子进程运行 scp 身份文件不可访问
- thymeleaf - 片段抛出错误内的条件对象
- python - 如何对多个属性(列)进行日志转换 - Python
- r - R中的单独字符数
- html - iframe pdf 无法在移动设备上正确显示
- ruby-on-rails - Postgres 编码“UTF8”的无效字节序列:0xc3 0x2f