bootstrap h1~h6标题的使用

1 h1~h6标题的具体运用非常简单,和我们平时运用是一样的,使用<h1>~<h6>标签,分别表示标题一至标题六,h 后面的数字越大,表示级别越小,文本也越小
在Bootstrap中为了让非标题元素和标题使用相同的样式,还特意定义了.h1~.h6六个类名
<!doctype html>
<html>
<meta charset = "utf-8">
<title>标题一</title>
<link rel="stylesheet" type="text/css" href="bootstrap-3.3.5/dist/css/bootstrap.min.css"">
<body>
    <h1>bootstrap标题一</h1>
    <h2>bootstrap标题二</h2>
    <h3>bootstrap标题三</h3>
    <h4>bootstrap标题四</h4>
    <h5>bootstrap标题五</h5>
    <h6>bootstrap标题六</h6>


    <!--Bootstrap中让非标题元素和标题使用相同的样式-->
     <div class="h1">Bootstrap标题一</div>
     <div class="h2">Bootstrap标题二</div>
     <div class="h3">Bootstrap标题三</div>
     <div class="h4">Bootstrap标题四</div>
     <div class="h5">Bootstrap标题五</div>
     <div class="h6">Bootstrap标题六</div>
</body>
</html>
2 副标题
在Web的制作中,常常会碰到在一个标题后面紧跟着一行小的副标题。在Bootstrap中他也考虑了这种排版效果,使用了<small>标签来制作副标题
<small>内的文本字体在h1~h3内,其大小都设置为当前字号的65%;而在h4~h6内的字号都设置为当前字号的75%;
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>标题(二)</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
</head>

<body>

<!--Bootstrap中使用了<small>标签来制作副标题-->
<h1>Bootstrap标题一<small>我是副标题</small></h1>
<h2>Bootstrap标题二<small>我是副标题</small></h2>
<h3>Bootstrap标题三<small>我是副标题</small></h3>
<h4>Bootstrap标题四<small>我是副标题</small></h4>
<h5>Bootstrap标题五<small>我是副标题</small></h5>
<h6>Bootstrap标题六<small>我是副标题</small></h6>

<h1>孤儿院无私奉献30年<small>一曲人性的赞歌</small></h1>

<h3>孤儿院无私奉献30年  <small>一曲人性的赞歌</small></h1>
</body>
</html>

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值