html文档中图形的变形,html-(引导程序3)更改屏幕尺寸时,使用jumbotron的文本和图像会变形...

今天,我使用引导程序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.

Learn more Extras

Bootstrap提供了一个Jumbotron组件,可以用于在页面上显示重要的信息或者是引导用户注意。 Jumbotron组件可以让文本容易阅读,同可以在背景上添加一张大图或者一段视频。下面是一个Jumbotron的基本模板代码: ```html <div class="jumbotron"> <h1>Hello, world!</h1> <p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p> <p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p> </div> ``` 使用Jumbotron组件,可以通过添加`.jumbotron`类来创建一个Jumbotron。在这个例子,我们添加了一个大标题、一些文本和一个按钮。按钮使用了Bootstrap的`.btn`和`.btn-primary`类来样式化。 如果你想要让Jumbotron更适合大屏幕的显示,可以在外层容器上添加`.container-fluid`类。这将使Jumbotron组件扩展到整个屏幕宽度。下面是一个示例代码: ```html <div class="container-fluid"> <div class="jumbotron"> <h1>Hello, world!</h1> <p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p> <p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p> </div> </div> ``` 这样,Jumbotron组件就可以在超大屏幕上显示了。注意:由于Jumbotron组件扩展到整个屏幕宽度,因此在使用需要注意页面排版和响应式设计的问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值