Bootstrap3學(xué)習(xí)筆記(二)之排版
在上篇文章給大家介紹了BootStrap3學(xué)習(xí)筆記(一)之網(wǎng)格系統(tǒng)
對于標(biāo)題,Bootstrap已經(jīng)修改了h1--h6的樣式,如果需要副標(biāo)題,還可以在其中使用small標(biāo)記
<h1>h1. Bootstrap heading <small>Secondary text</small></h1> <h2>h2. Bootstrap heading <small>Secondary text</small></h2> <h3>h3. Bootstrap heading <small>Secondary text</small></h3> <h4>h4. Bootstrap heading <small>Secondary text</small></h4> <h5>h5. Bootstrap heading <small>Secondary text</small></h5> <h6>h6. Bootstrap heading <small>Secondary text</small></h6>
如果頁面中有一個需要與眾不同的h1,則可以將其包含在樣式為“page-header的div中。
<div class="page-header"> <h1>Twitter Bootstrap <small>An intuitive front-end framework</small></h1> </div>
Bootstrap默認字體大小為14px,行高1.428,段落間距10px,如果某個段落需要醒目一點,可是有'lead'類
使用text-*類,可以很方便的設(shè)定文本的水平對齊方式
<p class="text-left">Left aligned text.</p> <p class="text-center">Center aligned text.</p> <p class="text-right">Right aligned text.</p> <p class="text-justify">Justified text.</p> <p class="text-nowrap">No wrap text.</p>
HTML中的文字格式標(biāo)記在Bootstrap中都可以使用
<p><b>This is bold text</b></p> <p><big>This is big text</big></p> <p><code>This is computer code</code></p> <p><em>This is emphasized text</em></p> <p><i>This is italic text</i></p> <p><mark>This is highlighted text</mark></p> <p><small>This is small text</small></p> <p><strong>This is strongly emphasized text</strong></p> <p>This is <sub>subscript</sub> and <sup>superscript</sup></p> <p><ins>This text is inserted to the document</ins></p> <p><del>This text is deleted from the document</del></p>
字母格式轉(zhuǎn)換類可以很好的完成需要的轉(zhuǎn)換:
<p class="text-lowercase">The quick brown fox jumps over the lazy dog.</p> <p class="text-uppercase">The quick brown fox jumps over the lazy dog.</p> <p class="text-capitalize">The quick brown fox jumps over the lazy dog.</p>
顏色是傳遞內(nèi)容重要性的有力方式,Bootstrap提供了便利的設(shè)定文字強調(diào)級別的類:
<p class="text-muted">Muted: This text is grayed out.</p> <p class="text-primary">Important: Please read the instructions carefully before proceed.</p> <p class="text-success">Success: Your message has been sent successfully.</p> <p class="text-info">Note: You must agree with the terms and conditions to complete the sign up process.</p> <p class="text-warning">Warning: There was a problem with your network connection.</p> <p class="text-danger">Error: An error has been occurred while submitting your data.</p>
對引用內(nèi)容也做了修飾:
<blockquote class="pull-right"> <p>The world is a dangerous place to live; not because of the people who are evil, but because of the people who don't do anything about it.</p> <small>by <cite>Albert Einstein</cite></small> </blockquote>
其中的類是為了右對齊引用。
以上所述是小編給大家介紹的Bootstrap3學(xué)習(xí)筆記(二)之排版的相關(guān)知識,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
微信小程序之側(cè)邊欄滑動實現(xiàn)過程解析(附完整源碼)
這篇文章主要介紹了微信小程序之側(cè)邊欄滑動實現(xiàn)過程解析(附完整源碼),文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下2019-08-08javascript開發(fā)隨筆二 動態(tài)加載js和文件
js無非就是script標(biāo)簽引入頁面,但當(dāng)項目越來越大的時候,單頁面引入N個js顯然不行,合并為單個文件減少了請求數(shù),但請求的文件體積卻很大2011-11-11前端不使用i18n該如何優(yōu)雅的實現(xiàn)多語言
多語言的重要性相信不需要多言,下面這篇文章主要給大家介紹了關(guān)于前端不使用i18n該如何優(yōu)雅的實現(xiàn)多語言,文中通過圖文介紹的非常詳細,需要的朋友可以參考下2023-01-01JavaScript 實現(xiàn)拖拽效果組件功能(兼容移動端)
這篇文章主要介紹了JavaScript 實現(xiàn)拖拽效果組件功能(兼容移動端),本文給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-11-11