学习笔记5-bootstrap 排版

1.HTML 中的所有标题标签,<h1> 到 <h6> 均可使用。另外,还提供了 .h1 到 .h6 类,为的是给内联(inline)属性的文本赋予标题的样式。如:

<h1>h1. Bootstrap heading</h1>
<h2>标题h2</h2>              //运行结果:标题h2
<h3>h3. Bootstrap heading</h3>   //h3. Bootstrap heading
<h4>h4. Bootstrap heading</h4>
<h5>h5. Bootstrap heading</h5>
<h6>h6. Bootstrap heading</h6>

2.在标题内还可以包含 <small> 标签或赋予 .small 类的元素,可以用来标记副标题。如果需要向任何标题添加一个内联子标题,只需要简单地在元素两旁添加 <small>,或者添加 .small class,就能得到一个字号更小的颜色更浅的文本。
<!---运行结果:h1.Bootstrap heading Secondary text--->
<h1>h1. Bootstrap heading <small>Secondary text</small></h1>
<h1>标题<small>副标题</small></h1>
3.页面主体:
Bootstrap 将全局 font-size 设置为 14pxline-height 设置为 1.428。这些属性直接赋予 <body> 元素和所有段落元素。另外,<p> (段落)元素还被设置了等于 1/2 行高(即 10px)的底部外边距(margin)。如:
<p>...</p>

4.通过添加 .lead 类可以让段落突出显示。如:
<p class="lead">...</p>

5.通过增加 font-weight 值强调一段文本。如:
<strong>rendered as bold text</strong>

6.斜体:
<em>rendered as italicized text</em>

7.下划线:
<u>This line of text will render as underlined</u>

8.地址

让联系信息以最接近日常使用的格式呈现。在每行结尾添加 <br> 可以保留需要的样式。

Twitter, Inc.
795 Folsom Ave, Suite 600
San Francisco, CA 94107
P: (123) 456-7890
Full Name
first.last@example.com
Copy
<address>
  <strong>Twitter, Inc.</strong><br>
  795 Folsom Ave, Suite 600<br>
  San Francisco, CA 94107<br>
  <abbr title="Phone">P:</abbr> (123) 456-7890
</address>

<address>
  <strong>Full Name</strong><br>
  <a href="mailto:#">first.last@example.com</a>
</address>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值