css01入门小例子

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <!--使用内部样式-->
    <style type="text/css">
        * {
            margin: 0px; /*外边距*/
            padding: 0px;/*内边距*/
        }

        body {
            background: url("image/liqingzhao.jpg") no-repeat; /*图片 不平铺*/
            padding-left: 250px;/*距离左边250像素*/
            padding-top: 30px;/*距离头部30像素*/
        }

        h1, p {
            color: white; /*颜色为白色*/
            font-family: 楷体;
        }

        p {
            font-size: 24px;/*字体大小*/
        }

        hr {
            width: 400px;/*宽度*/
        }
        b{
            color: blue;
        }
    </style>
</head>
<body>
<!--
  什么是css?  (Cascading Style Sheets) 级联样式表/层叠样式表
  设置HTML或者XHTML文件样式的计算机语言!
  样式???
  字体,字体的颜色,大小,背景图片,网页的定位!
-->

<h1>清平乐·年年雪里</h1>
<em>朝代:宋代</em> &nbsp;&nbsp;作者:<b>李清照</b>
<hr/>
<p>
    原文:<br/>
    年年雪里,常插梅花醉,<br/>挼尽梅花无好意,赢得满衣清泪!<br/>
    今年海角天涯,萧萧两鬓生华。<br/>
    看取晚来风势,故应难看梅花。<br/>
</p>

</body>
</html>

效果图

原文地址:https://www.cnblogs.com/xtdxs/p/7094123.html