web之字体格式篇

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>web之字符间格式和首行缩进篇</title>
    <style type="text/css">
        h3{text-align: center; color: #3300ff;}
        hr{color: #660066;}
        #p1{letter-spacing: 2px; line-height: lem; text-indent: 2em;}
        #p2{letter-spacing: 4px; line-height: 1.5em; text-indent: 3em;}
        /* letter-spacing为字母之间的间距,line-height为行高的属性,text-indent为首行缩进的属性,word-spacing为单词之间的间隔 */
        #p3{letter-spacing: 7px; line-height: 2em; text-indent: 4em; word-spacing: 10px;}
    </style>
</head>
<body>
    <h3>设置字符间距,行高及首行缩进</h3>
    <hr>
    <p id="p1">
        As you grow older, you'll find the only things you regret are the things you didn't do.成长会让人明白,唯一后悔的只是那些自己不曾尝试的事。
    </p>
    <p id="p2">
        As you grow older, you'll find the only things you regret are the things you didn't do.成长会让人明白,唯一后悔的只是那些自己不曾尝试的事。
    </p>
    <p id="p3">
        As you grow older, you'll find the only things you regret are the things you didn't do.成长会让人明白,唯一后悔的只是那些自己不曾尝试的事。
    </p>
</body>
</html>

发布了151 篇原创文章 · 获赞 93 · 访问量 10万+

猜你喜欢

转载自blog.csdn.net/qq_40258748/article/details/101448040