[Bootstrap] 2. class 'row' & 'col-md-x' & 'col-md-offset-x'
2023-09-14 09:00:55 时间
Usually when desgin a web page, we think building the page in grid.
Bootstrap can help us to do that.
It divides the page into 12 cols. In the picture, there are three rows, on the top is header (it takes 12 cols), in the middle there is two cols, in the bottom, there are three cols.
You can finish this work quickly by using 'col-md-x' class: it should sum up to 12 for each row.
To organize the code structure better, you can but add 'row' class:
If one row exceeds 12 cols, the page layout would broken.
If you want to add more padding:
You can use 'col-md-offest-x' class:
Result:
相关文章
- Errors occurred during the build.Errors running builder 'Checkstyle Builder' on
- [Java Spring] @Value & override properties by environment variables
- [Bootstrap] 8. 'Collapse', data-target, data-toggle & data-parent
- [Servlet&JSP] 初识ServletConfig
- 华为OD机试 - 任务最优调度(Java & JS & Python)
- 自定义C++ void swap(int& ra, int * pb)函数