Bootstrap巨幕是一個輕量級、靈活的組件,用于展示關鍵的營銷信息。它提供了一種簡單的方式來創(chuàng)建響應式布局,可以在不同設備上自動調整大小和樣式。要使用Bootstrap巨幕組件,首先需要在HTML文件中引入Bootstrap的CSS和JavaScript文件。
一、示例
<div class="jumbotron"> <h1 class="display-4">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> <a class="btn btn-primary btn-lg" href="#" rel="external nofollow" role="button">Learn more</a> </div>
二、無圓角示例
要使巨幕變寬且不帶圓角,請?zhí)砑有揎椃惒⑻砑?or within。
<div class="jumbotron jumbotron-fluid"> <div class="container"> <h1 class="display-4">Fluid jumbotron</h1> <p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p> </div> </div>