Bootstrap3 标题样式

编程知识 行业动态 更新时间:2024-06-13 00:22:34

标题

HTML中定义的所有标题标签,从 <h1> 到 <h6>,在Bootstrap中都是可用的。并且,为了在所有浏览器下都得到一致的效果,Bootstrap还为它们提供了预定义的样式。如:

 
  1. <h1>h1. Bootstrap heading</h1>
  2. <h2>h2. Bootstrap heading</h2>
  3. <h3>h3. Bootstrap heading</h3>
  4. <h4>h4. Bootstrap heading</h4>
  5. <h5>h5. Bootstrap heading</h5>
  6. <h6>h6. Bootstrap heading</h6>

运行结果如图 2‑10所示:

图2-10 标题

同时,Bootstrap还提供了 .h1 到 .h6 类,如果你希望标题拥有 <h1> 到 <h6> 的样式但又要在行内显示,就可以使用这些类。

在 <h1> 到 <h6> 标题的内部,还可以使用 <small> 标签或 .small 类来创建副标题。与标题相比,副标题的文本稍细、字体稍小、颜色稍浅。如:

 
  1. <h1>h1. Bootstrap heading <small>Secondary text</small></h1>
  2. <h2>h2. Bootstrap heading <small>Secondary text</small></h2>
  3. <h3>h3. Bootstrap heading <small>Secondary text</small></h3>
  4. <h4>h4. Bootstrap heading <small>Secondary text</small></h4>
  5. <h5>h5. Bootstrap heading <small>Secondary text</small></h5>
  6. <h6>h6. Bootstrap heading <small>Secondary text</small></h6>

运行结果如图 2‑11所示:

图2-11 副标题

关于作者

歪脖先生,十五年以上软件开发经验,酷爱Web开发,精通 HTML、CSS、JavaScript、jQuery、JSON、Python、Less、Bootstrap等,著有《HTML宝典》、《揭秘CSS》、《Less简明教程》、《JSON教程》、《Bootstrap2用户指南》、《Bootstrap3实用教程》,并全部在 GitHub 上开源。

更多推荐

Bootstrap3 标题样式

本文发布于:2023-04-02 18:51:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/f7ccd05fefca2a7748adef178a6ea913.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:样式   标题

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!