html - 在其下方部分的顶部制作 Bootstrap header 图像 "lock"

标签 html css twitter-bootstrap

http://www.wearethefirehouse.com/wcftest/

当窗口展开时,页眉背景图像“ float ”在其下方部分的顶部下方。如果打开浏览器窗口,您可以看到图像有大约一半留在下方“关于”部分的顶部下方。

如何编辑 CSS 以“锁定”该背景图像的底部,使其不会滑入下方? (BG 图像底部的渐 rebase 本上应该始终与棕色相对,以达到这种效果。)

这是 CSS:

.intro {
display: table;
width: 100%;
padding: 100px 0;
text-align: center;
color: #0000;
background: url(../img/intro-bg5.jpg) no-repeat top center;
background-color: #000;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover; }

最佳答案

将 css 更改为:

margin-top: 56px; 添加到 .intro 部分

.intro {
display: table;
width: 100%;
padding: 100px 0;
text-align: center;
color: #0000;
background: url(../img/intro-bg5.jpg) no-repeat top center;
background-color: #000;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
margin-top: 56px;
}

并在 @media (min-width: 767) 部分的 .intro 中添加 margin-top: 0;:

@media (min-width: 767px)
.intro {
height: 100%;
padding: 0;
margin-top: 0px;
}

但是正如 webeno 的回答中所述,这并不能解决您的梯度问题。

关于html - 在其下方部分的顶部制作 Bootstrap header 图像 "lock",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26691941/

相关文章:

html - Bootstrap 3 Textarea with input-group-button 和 btn-group-vertical

html - 面对显示 :flex, 的问题,我应该改用 float

javascript - 如何每 x 秒更改数组中 <li> 的内容?

html - 使用 Bootstrap 2.3 为表单留下的边距

ruby-on-rails - Bootstrap 弹出框不工作 Rails

java - 简单的 html 表单 .. 未执行操作字段

html - 带有白色圆圈背景的 Bootstrap 3 符号字形图标

css - 嵌套表增加了外部表的宽度

css - 空 div 在 FF 中导致对齐问题

html - Bootstrap - 在容器流体中垂直和水平居中内容