官术网_书友最值得收藏!

Layout

Possibly the most important and widely used feature is Bootstrap's ability to lay out and organize a page. At the core of this functionality lies the Bootstrap grid system: a series of CSS classes and media queries that allow you to easily define the horizontal and vertical position of elements on a page, taking into account different screen sizes at the same time. Using the grid system is as easy as applying a few classes to your elements and specifying a tier (that is, the viewport size at which the sizing for the element takes effect). No JavaScript magic or custom CSS rules need to be written. With Bootstrap 4, this grid system has been completely overhauled, and a new grid tier has been added. This means that in contrast to Bootstrap 3, the grid system now offers tiers for extra-small, small, medium, large, and extra-large displays. We will be talking about tiers, breakpoints, and Bootstrap's grid system extensively in Chapter 2, Making a Style Statement.

Along with the grid system, Bootstrap offers the following:

  • Responsive containers.
  • Responsive breakpoints for adjusting page layout in response to differing screen sizes.
  • Media objects that act as building blocks and allow you to build your own structural components.
  • Utility classes that allow you to manipulate elements in a responsive manner. For example, you can use the layout utility classes to hide elements, depending on screen size.

Also, Bootstrap 4 now ships with default support for a CSS3 layout mode called flexbox, for the easier positioning of elements while also accounting for different screen sizes. We will be talking about how to manage element alignment using flexbox later on in Chapter 8, Utilities.

主站蜘蛛池模板: 家居| 青神县| 阿巴嘎旗| 璧山县| 怀化市| 荆门市| 罗田县| 嘉定区| 和林格尔县| 通化县| 于田县| 乐至县| 应城市| 白河县| 临沭县| 女性| 信丰县| 永丰县| 泸西县| 睢宁县| 织金县| 房山区| 浦江县| 深圳市| 辛集市| 庄河市| 永福县| 富平县| 梅河口市| 潮州市| 元谋县| 蒲江县| 乐清市| 湖南省| 民乐县| 调兵山市| 句容市| 北宁市| 武威市| 华亭县| 天等县|