©
本文档使用 PHP中文网手册 发布
展示主角(hero)单位风格内容的轻量级灵活组件。
一个轻量级,灵活的组件,可以选择扩展整个视口,以展示您网站上的关键营销信息。
<div class="jumbotron"> <h1 class="display-3">Hello, world!</h1> <p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p> <hr class="my-4"> <p>It uses utility classes for typography and spacing to space content out within the larger container.</p> <p class="lead"> <a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a> </p></div>
为了使 jumbotron 完整宽度,并且没有圆角,添加.jumbotron-fluid
修饰符类并添加一个.container
或.container-fluid
之内。
<div class="jumbotron jumbotron-fluid"> <div class="container"> <h1 class="display-3">Fluid jumbotron</h1> <p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p> </div></div>