- 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.

- 精通Nginx(第2版)
- R語(yǔ)言數(shù)據(jù)分析從入門(mén)到精通
- Beginning C++ Game Programming
- Learning ASP.NET Core 2.0
- C語(yǔ)言課程設(shè)計(jì)
- Unity UI Cookbook
- 深入淺出React和Redux
- 第一行代碼 C語(yǔ)言(視頻講解版)
- Visualforce Developer’s guide
- INSTANT Silverlight 5 Animation
- HTML+CSS+JavaScript網(wǎng)頁(yè)設(shè)計(jì)從入門(mén)到精通 (清華社"視頻大講堂"大系·網(wǎng)絡(luò)開(kāi)發(fā)視頻大講堂)
- 現(xiàn)代C:概念剖析和編程實(shí)踐
- 量子計(jì)算機(jī)編程:從入門(mén)到實(shí)踐
- 絕密原型檔案:看看專業(yè)產(chǎn)品經(jīng)理的原型是什么樣
- Implementing Splunk(Second Edition)