0
点赞
收藏
分享

微信扫一扫

CSS文字大小

夏木之下 2022-01-30 阅读 56

1.代码:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文字大小</title>

    <style>
            body{
                font-size: 16px;
            }

            /* 标题标签比较特殊,需要单独指定文字的大小 */
            h2{
                font-size: 20px;
            }
    </style>
</head>

<body>
            <h2>文字标题</h2>
            <p>段落一</p>
            <p>段落二</p>   
            <p>段落三</p>
            <p>段落四</p>
            <p>段落五</p> 
</body>

</html>

2、运行效果:

 

举报

相关推荐

css 文字换行

0 条评论