今天,我使用引导程序3制作了一个网页,我更改了’jumbroton’编码,使其看起来像这样:http://www.bootply.com/103783
虽然背景图片可以显示出来,但是当我调整其大小时,页面不会调整大小,而是将文本和图像放在“巨型”中的其他内容之下.
我试过在’大锅’周围放一个’容器’却没有运气… ?
尝试滚动,您会明白我的意思!
‘style.css’中的CSS代码
.bg {
background: url('/img/BG.jpg') no-repeat center center !important;
position: fixed !important;
width: 100% !important;
height: 350px !important; /*same height as jumbotron */
top:0 !important;
left:0 !important;
z-index: -1 !important;
}
.jumbotron {
margin-bottom: 40px !important;
height: 350px !important;
color: white !important;
text-shadow: black 0.1em 0.3em 0.3em !important;
background:transparent !important;
HTML“巨无霸”
Hello, world!
This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.