Excerpt translated from the subtle Magic Behind why the Bootstrap 3 Grid WorksFrom contact with Bootstrap has been a long time, giving the feeling is fast, simple, easy to get started, wherein the grid system is a highlight:
Always feel like CSS grid system and so o
Bootstrap provides a responsive, mobile-first streaming raster system that is automatically divided into up to 12 columns as the screen or viewport (viewport) size increases. It contains pre- defined classes that are easy to use , and powerful mixin for generating more semantic layouts . First, IntroductionA raster system is used to create a page layout with a series of rows and columns (column), and your content can be placed in these created layouts
1. Introduction
Bootstrap has a set of responsive, mobile-priority streaming grid systems, which are automatically divided into up to 12 columns as the size of the screen device or viewport (viewport) increases. It includes easy-to-use predefined classe, and powerful mixin for generating more semantic layouts.
2, grid options
Bootstrap3.x uses four kinds of
Basic introduction1. Bootstrap provides a responsive, mobile-first streaming grid system that automatically divides the system into up to 12 columns as the screen or viewport (viewport) size increases2. The raster system is used to create a page layout with a series of rows (row) and columns (column) combinations3, row must be included .container (fixed width) or .container-fluid (100% width) in order to gi
The raster system is used to create a page layout from a combination of row (row) and column (columns), which can be placed in a well-created layout.How the bootstrap grid system works:
"row" must be included in . Container , In order to give it an appropriate arrangement (aligment) and an inner complement (padding) through Point container, the interface can be placed in the middle of the brow
Http://www.cnblogs.com/linjiqin/p/3559800.htmlBootstrap Grid SystemDirectory1. Introduction2. Grid options3. Column Offset4. Nested columns5. Column sorting1. IntroductionThe bootstrap incorporates a responsive, mobile-first streaming grid system that is automatically divided into up to 12 columns as the screen device
The grid system of the bootstrap framework works as follows:1. The data row (. Row) must be included in the container (. Container) to give it the appropriate alignment and padding (padding). Such as:2. Columns (. Column) can be added in the row (. Row), but the sum of the columns cannot exceed the total number of columns in the split, such as 12. Such as:Divclass= "Container"> Divclass= "Row">
1. IntroductionThe bootstrap incorporates a responsive, mobile-first streaming grid system that is automatically divided into up to 12 columns as the screen device or viewport (viewport) size increases. It includes easy-to-use pre-defined Classe, and powerful mixin for generating more semantic layouts.2. Grid optionsBootstrap3.x uses four raster options to form a
BootStrap getting started tutorial (3) responsive principle, bootstrap getting started tutorial
Related reading:
BootStrap getting started tutorial (1) visual layout
BootStrap getting s
Offset columns:
In the bootstrap grid system we can use an offset column to make a column move to the right, as follows:
class= "Col-sm-2 col-sm-offset-1" said the column accounted for two copies and moved to the right to see the effect as follows:
Col-sm-offset-1 says move right one. Col-sm-offset-2 represents a two-part right shift, and so on. The Col-xs class does not support offset columns,
. col-xs-*--grid column for mobile phones ();. col-sm-*--grid column for tablets (≥768px);. col-md-*--grid column for desktop displays (≥992px);. col-lg-*--grid column for large desktop displays (≥1200px);. col-md-offset-*--the right offset column;. col-md-push-*,. col-md-pull-*--change the sorting of columns; Copyri
In other words, Bootstrap provides a 12-based grid, which can be used to obtain the layout (horizontal) of 12-minute n ).
This is what it looks like (span is an invisible div. In order to see it, I used the style sheet in bootstrap ):
The Code is as follows:
There are two ways to deploy Bootstrap: fixed and fluid.
This is a very basic form of bootstrap, but is it so easy to master and understand?(1). For COL-MD Div, the default is vertical arrangement, when the viewport (screen or browser width) >992px,col-md-1 div blocks are arranged horizontally(2). Container The maximum width of the div is adaptive, according to the screen or browser "viewport" width automatically adjusted, for example, when the "viewport" width >=1200px, container div maximum width is 1170p
more complex. Then look at the light blue and light pink tracks to feel it.
Grid area
The meaning of grid lines, cells, and tracks is to divide the container into the area you need to grid areas. A region is an entire block that can contain multiple cells, so how do you divide it? The area is the intersection of two horizontal
% width, 100% width, full lineThe interval between columns and columns is set by setting the Padding property of the element that contains the column, and if the number of columns contained in a row is greater than 12, the remaining columns will be another row as a whole. Depending on the screen size, the class prefixes for the columns are:
Ultra small screen phone (
small screen tablet (≥768px)
medium screen desktop display (≥992px)
bi
1 gridBootstrap provides a responsive, mobile-first streaming raster system that is automatically divided into up to 12 columns as the screen or viewport (viewport) size increases."Utf-8"/> "stylesheet"href="Css/index.css"/> "Viewport"Content="width=device-width,initial-scale=1"> "Viewport"Content="width=device-width, initial-scale=1, maximum-scale=1, User-scalable=no"> "icon"href="./img/index.png"> "stylesheet"href="Http://cdn.bootcss.com/bootstrap/3
Layout containerBootstrap needs to wrap a container for the page content and grid system .container . We have provided two classes for this purpose. Note that because padding of such attributes, the two container classes cannot be nested with each other ..containerClass is used to fix widths and support a container for responsive layouts.Copyclass="container"> ....container-fluidThe viewport class is used for containers with a width of 100% that occu
Bootstrap grid system (grip system) divides the page into 12 grids, which can be divided according to the 12 grids, which is very convenient for writing adaptive pages, and only needs to be cooperated with. Row class and. Col class,. col-xs-ultra-small screen cell phone (
For example, if you want to achieve the results of the following pictures on the page, simply divide the
-offset-4" on the column element to indicate that the column moves the width of the 4 columns to the right.4. Column sorting (col-md-push-* and col-md-pull-* (where the asterisk represents the number of column combinations moved))5. Nesting of columnsThe code is as follows:Divclass= "Container"> Divclass= "Row"> Divclass= "Col-md-8">I have a grid nested inside.Divclass= "Row"> Divclass= "Col-md-6">Col-md-6Div> Divclass=
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.