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>内部样式</title>
    <style type="text/css">
        /* .表示的是选择的类属性 */
        .int_css{
            border-width: 2px;     /* 边框的宽度 */
            border-style: solid;   /* 定义边框的样式 */
            color: red;          /* 定义颜色 */
        }
        /* #选择的ID属性 */
        #h1_css{
            font-size: 50px;        /* 定义字体的大小 */
            font-style: italic;     /* 定义字体的样式 */
        }
    </style>
</head>
<body>
    <h1 class="int_css">h1这个标题使用类样式</h1>
    <h1 id="h1_css">h1这个标题使用ID样式</h1>
    <h1>h1这个标题没有使用样式。</h1>
</body>
</html>
发布了151 篇原创文章 · 获赞 93 · 访问量 10万+

猜你喜欢

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