Home > Article > Web Front-end > What is the principle of bootstrap?
The implementation principle of the grid system is to define the size of the container and divide it equally into 12 parts (it can also be divided into 24 or 32 parts, but 12 parts is the most common ), then adjust the inner and outer margins, and finally combine it with media queries to create a powerful responsive grid system. The grid system in the Bootstrap framework divides the container into 12 equal parts.
What is the principle of bootstrap
The implementation principle of bootstrap
By defining the size of the container, it is divided into 12 equal parts ( There are also 24 copies, 23 copies (take 12 copies to make a dozen, which means advanced perfection), then adjust the inner and outer margins, and finally combine with media queries to create a powerful responsive grid system. (The value of 12 can be modified by recompiling the LESS code source).
1. The data row (.row) must be contained in the container (.container) in order to be given appropriate alignment and padding.
2. You can add columns (.column) in rows (.row), but the sum of the number of columns cannot exceed the total number of equal columns, for example: 12.
3. By setting Padding creates space between columns. Then offset the effect of padding by setting negative margins for the first and last columns.
4. If you don’t want two adjacent columns to be close together, use the offset function to achieve this.
Related recommendations: "bootstrap tutorial"
The above is the detailed content of What is the principle of bootstrap?. For more information, please follow other related articles on the PHP Chinese website!