3.8.1 标题
重新定义h1到h6标签
此外,bootstrap还提供了六个类,.h1到.h6。这六个类可以使用在大部分的标签,使得标签上的文字具有h1到h6标签的样式,包括字体,大小,颜色。
但是和直接使用h1到h6标签有两点区别:
1.标签是标题,会直接换行,类不会换行。
2.标签有上下的行距(如上图),类没有
元素 | 字体大小 | 计算比例 | 其他 |
---|---|---|---|
h1 | 36px | 14px*2.60 | margin-top:20px;margin-bottom:10px |
h2 | 30px | 14px*2.15 | margin-top:20px;margin-bottom:10px |
h3 | 24px | 14px*1.70 | margin-top:20px;margin-bottom:10px |
h4 | 18px | 14px*1.25 | margin-top:10px;margin-bottom:10px |
h5 | 14px | 14px*1.00 | margin-top:10px;margin-bottom:10px |
h6 | 12px | 14px*0.85 | margin-top:10px;margin-bottom:10px |
此外,bootstrap还提供了六个类,.h1到.h6。这六个类可以使用在大部分的标签,使得标签上的文字具有h1到h6标签的样式,包括字体,大小,颜色。
但是和直接使用h1到h6标签有两点区别:
1.标签是标题,会直接换行,类不会换行。
2.标签有上下的行距(如上图),类没有