作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在标题中添加了“固定顶部”,但现在轮播的一部分位于导航栏后面。
有没有办法将它们放置在彼此之下,不重叠且不添加手动边距 px?
代码:
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
//CONTENT
</nav>
<div id="demo" class="carousel slide" data-ride="carousel">
//CONTENT
</div>
最佳答案
尝试通过这种方式实现您的目标。
.fixed-top{
height:48px; //if you are taking height 48px;
position:fixed;
width:100%;
}
.carousel{
position:relative;
top:48px; // use top 48px to solve this problem
}
关于html - 将固定导航栏与旋转木马精确对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55846046/
我尝试通过电子邮件发送使用 Delphi 构建的 DLL 文件,但收到了拒绝电子邮件报告: “您的电子邮件被拒绝,因为它包含 Trojan.Delf-9364” 所以我将文件上传到 http://sc
Nod32 刚刚警告我有关嵌入到网站图标中的木马。 我在这里复制了 favicon.ico 的内容: http://pastebin.com/BkD4tKNy 不幸的是,我对 Javascript 没
我正在 Code::Blocks 20.03 和 MinGW(GCC Build-20200227-1 9.2.0,单独安装)中测试一个简单的“hello world”程序,但运行它时在控制台上没有消
我是一名优秀的程序员,十分优秀!