1、font-style:字体样式

设置字体倾斜样式或者正常样式。
取值:normal(正常)、italic(斜体)、oblique(斜体)
代码↓

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>Document</title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        p{
            font-size: 20px;
            line-height: 48px;
            color: red;
            font-family: "Consolas","Arial","微软雅黑";
        }
        .one{
            font-style: normal;
        }
        .tow{
            font-style: italic;
        }
        .three{
            font-style: oblique;
        }
    </style>
</head>
<body>
    <p class="one">这是一个段落this is a paragraph,normal</p>
    <p class="tow">这是一个段落this is a paragraph,italic</p>
    <p class="three">这是一个段落this is a paragraph,oblique</p>
</body>
</html>
View Code

相关文章: