- Bootstrap 4:Responsive Web Design
- Silvio Moreto Matt Lambert Benjamin Jakobus Jason Marah
- 350字
- 2021-07-09 18:54:42
Final thoughts
Before ending this chapter, we must get some things clear. Bootstrap offers some helper classes mixins and some vendor's mixins, which offer cross-browser compatibility support.
Box-sizing
Bootstrap 3 started using box-sizing: border-box
for all elements and pseudo-elements. With this enabled, the width and height properties start to include the padding and the border but not the margin.
With that, it is easier to set the right sizing for your elements. This is because any change that you make in the element, such as customizing the padding of a .row
, will reflect the width and height of the whole element. The following figure shows you the differences of box-sizing.

Quick floats
Bootstrap offers quick classes to make an element float. Add the .pull-left
or .pull-right
class to make the elements float left or right, respectively. Keep in mind that both classes apply the !important
modifier to avoid override issues:
<div class="pull-left"></div> <div class="pull-right"></div>
Clearfix
Clearfix is a way of clearing the floating of an element related to its child element. The Bootstrap columns are all floated left, and the parent row has a clearfix. This makes every column appear right next to each other, and the row does not overlap with other rows. This figure exemplifies how clearfix works:

So, if you want to add the clearfix to a new element or pseudo-element, add the .clearfix
class and you can get the hard work quickly done.
Font definitions for typography
In the following table, the font sizes for default text and heading are presented. It describes the heading, font family, and line height. It is important to make it explicit for you to deeply understand the Bootstrap default configuration if you want a different customization.

- 手機(jī)安全和可信應(yīng)用開(kāi)發(fā)指南:TrustZone與OP-TEE技術(shù)詳解
- iOS面試一戰(zhàn)到底
- Visual Basic程序開(kāi)發(fā)(學(xué)習(xí)筆記)
- Full-Stack Vue.js 2 and Laravel 5
- Python 3破冰人工智能:從入門(mén)到實(shí)戰(zhàn)
- MATLAB定量決策五大類(lèi)問(wèn)題
- Redis Essentials
- Cocos2d-x學(xué)習(xí)筆記:完全掌握Lua API與游戲項(xiàng)目開(kāi)發(fā) (未來(lái)書(shū)庫(kù))
- INSTANT Sinatra Starter
- SQL Server數(shù)據(jù)庫(kù)管理與開(kāi)發(fā)兵書(shū)
- Swift 4從零到精通iOS開(kāi)發(fā)
- Flowable流程引擎實(shí)戰(zhàn)
- Learning Splunk Web Framework
- Training Systems Using Python Statistical Modeling
- 從零開(kāi)始學(xué)Python大數(shù)據(jù)與量化交易