一.页面排版
Bootstrap 提供了一些常规设计好的页面排版的样式供开发者使用。
1.页面主体
Bootstrap 将全局 font-size 设置为 14px,line-height 行高设置为 1.428(即 20px);<p>段落元素被设置等于 1/2 行高(即 10px);颜色被设置为#333。
//创建包含段落突出的文本
Bootstrap 框架
Bootstrap 框架
Bootstrap 框架
Bootstrap 框架
Bootstrap 框架
2.标题
//从 h1 到 h6Bootstrap 框架
//36pxBootstrap 框架
//30pxBootstrap 框架
//24pxBootstrap 框架
//18pxBootstrap 框架
//14pxBootstrap 框架
//12px
我们从 Firebug 查看元素了解到,Bootstrap 分别对 h1 ~h6 进行了 CSS 样式的重构, 并且还支持普通内联元素定义 class=(.h1 ~ h6)来实现相同的功能。
//内联元素使用标题字体 <span class="h1">Bootstrap</span>
注:通过 Firebug 查看元素还看到,字体颜色、字体样式、行高均被固定了,从而保 证了统一性,而原生的会根据系统内置的首选字体决定,颜色是最黑色。在 h1 ~ h6 元素之间,还可以嵌入一个 small 元素作为副标题,//在标题元素内插入 small 元素
Bootstrap 框架 Bootstrap 小标题
Bootstrap 框架 Bootstrap 小标题
Bootstrap 框架 Bootstrap 小标题
Bootstrap 框架 Bootstrap 小标题
Bootstrap 框架 Bootstrap 小标题
Bootstrap 框架 Bootstrap 小标题
3.内联文本元素
//添加标记,<mark>元素或.mark 类
Bootstrap框架
Bootstrap 框架 //标准字号的 85% Bootstrap 框架 //加粗 700 Bootstrap 框架 //倾斜
4.对齐
//设置文本对齐
Bootstrap 框架
//居左Bootstrap 框架
//居中Bootstrap 框架
//居右Bootstrap 框架
//两端对齐,支持度不佳Bootstrap 框架
//不换行
5.大小写
//设置英文文本大小写
Bootstrap 框架
//小写Bootstrap 框架
//大写Bootstrap 框架
//首字母大写
6.缩略语
//缩略语
Bootstrap框架
7.地址文本
//设置地址,去掉了倾斜,设置了行高,底部 20px
Twitter, Inc. 795 Folsom Ave, Suite 600 San Francisco, CA 94107 P: (123) 456-7890
8.引用文本
//默认样式引用,增加了做边线,设定了字体大小和内外边距
Bootstrap 框架
//反向
Bootstrap 框架
9.列表排版
//移出默认样式
- Bootstrap 框架
- Bootstrap 框架
- Bootstrap 框架
- Bootstrap 框架
- Bootstrap 框架
- Bootstrap 框架
- Bootstrap 框架
- Bootstrap 框架
- Bootstrap 框架
- Bootstrap 框架
- Bootstrap
- Bootstrap 提供了一些常规设计好的页面排版的样式供开发者使用。
10.代码
//内联代码
<section>
//用户输入
press ctrl + ,
//代码块
<p>Please input...</p>