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>

猜你喜欢

转载自cfj.iteye.com/blog/2262722
h1