- Mastering Bootstrap 4(Second Edition)
- Benjamin Jakobus Jason Marah
- 400字
- 2021-06-24 19:25:51
The grid system
Bootstrap's grid system is arguably its most impressive and most commonly used feature, as it solves the important task of horizontal and vertical positioning of a page's contents, allowing the contents to be structured across multiple display widths. Therefore, mastering this core functionality is essential for any Bootstrap developer.
As already noted in Chapter 1, Revving Up Bootstrap, Bootstrap 4 is mobile-first. As such, it should come as no surprise that the grid system is optimized for smaller viewports, and it scales up to suit larger viewports (as opposed to scaling down to smaller viewports).
A viewport is the available display size to render the contents of a page, that is, it refers to your browser window, minus the toolbars and scrollbars. The viewport should not be confused with the viewport meta tag, which is used to define the viewport's actual display size. To elaborate, as already noted in Chapter 1, Revving Up Bootstrap, mobile devices may indicate their viewport to be larger than it actually is in order to allow for the display of websites that have not been optimized for display on mobile devices. As a consequence, websites that take mobile viewports into consideration may often not render as intended. As a remedy, the viewport meta tag was introduced by Apple on iOS (and has since been uniformly adopted by all other major browsers) in order to allow websites to circumvent this problem by allowing developers to explicitly define the intended display size.
The grid composing the grid system is a structure that consists of three distinct, but fundamentally linked, parts: an all—encapsulating container split into horizontal rows that are themselves split into 12 equal columns (refer to Figure 2.1). In the following subsections, we will take an in-depth look at the three building blocks of Bootstrap's grid system:

- pcDuino開發(fā)實(shí)戰(zhàn)
- Windows Server 2019 Cookbook
- Linux內(nèi)核完全注釋(20周年版·第2版)
- Instant Handlebars.js
- 混沌工程:復(fù)雜系統(tǒng)韌性實(shí)現(xiàn)之道
- 嵌入式操作系統(tǒng)(Linux篇)(微課版)
- Kali Linux 2018:Windows Penetration Testing
- 從實(shí)踐中學(xué)習(xí)Kali Linux無線網(wǎng)絡(luò)滲透測(cè)試
- 寫給架構(gòu)師的Linux實(shí)踐:設(shè)計(jì)并實(shí)現(xiàn)基于Linux的IT解決方案
- 新編電腦辦公(Windows 10+ Office 2013版)從入門到精通
- 鴻蒙操作系統(tǒng)設(shè)計(jì)原理與架構(gòu)
- iOS 10快速開發(fā):18天零基礎(chǔ)開發(fā)一個(gè)商業(yè)應(yīng)用
- 大規(guī)模分布式系統(tǒng)架構(gòu)與設(shè)計(jì)實(shí)戰(zhàn)
- 計(jì)算機(jī)應(yīng)用基礎(chǔ)(Windows 7+Office 2010)
- Responsive Web Design by Example:Beginner's Guide(Second Edition)