第18课:Bootstrap入门和栅格系统

1. Bootstrap简介

Bootstrap是一个流行的前端框架,用于快速开发响应式网页。

建议先熟悉HTML和CSS基础。

2. 容器与排版

.container 固定宽度
.container-fluid 100%宽度
排版演示

h1标题

lead类:突出显示的段落

引用内容
作者

3. 表格与辅助类

#姓名成绩
1小明90
2小红60
辅助背景色和文本色
右对齐
居中

4. 栅格系统基础

等宽1
等宽2
col-4
col-8
col-3
col-6
col-3

5. 响应式与嵌套

.col-12 .col-md-8
.col-6 .col-md-4
外层col-6
内层col-6
内层col-6
外层col-6

6. 对齐与偏移

居中
顶部
中部
底部
偏移4
列偏移
.col-md-4
.col-md-4 .offset-md-4
垂直对齐
One of three columns
One of three columns
One of three columns