Manual bahasa Cina Bootstrap
/ Bootstrap 超大屏幕
Bootstrap 超大屏幕
本章將講解 Bootstrap 支持的另一個特性,超大屏幕(Jumbotron)。顧名思義該組件可以增加標(biāo)題的大小,并為登陸頁面內(nèi)容添加更多的外邊距(margin)。使用超大屏幕(Jumbotron)的步驟如下:
創(chuàng)建一個帶有 class .jumbotron. 的容器 <div>。
除了更大的 <h1>,字體粗細(xì) font-weight 被減為 200px。
下面的實(shí)例演示了這點(diǎn):
實(shí)例
<!DOCTYPE html> <html> <head> <title>Bootstrap 實(shí)例 - 超大屏幕(Jumbotron)</title> <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"> <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script> <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <div class="jumbotron"> <h1>歡迎登陸頁面!</h1> <p>這是一個超大屏幕(Jumbotron)的實(shí)例。</p> <p><a class="btn btn-primary btn-lg" role="button"> 學(xué)習(xí)更多</a> </p> </div> </div> </body> </html>
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例
運(yùn)行結(jié)果
為了獲得占用全部寬度且不帶圓角的超大屏幕,請在所有的 .container class 外使用 .jumbotron class,如下面的實(shí)例所示:
實(shí)例
<!DOCTYPE html> <html> <head> <title>Bootstrap 實(shí)例 - 超大屏幕(Jumbotron)</title> <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"> <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script> <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> </head> <body> <div class="jumbotron"> <div class="container"> <h1>歡迎登陸頁面!</h1> <p>這是一個超大屏幕(Jumbotron)的實(shí)例。</p> <p><a class="btn btn-primary btn-lg" role="button"> 學(xué)習(xí)更多</a> </p> </div> </div> </body> </html>
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例