<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <style type="text/css">
        a:hover {
            color: red;
        }
        a:visited {
            color: green;
        }
        p:first-line {
            color: red;
        }
        p:first-letter {
            color: blue;
            font-size: xx-large;
        }
    </style>

</head>
<body>
    <div class="one">
    <a href="http://www.cnblogs.com" >这是一个测试伪类的链接</a>
    </div>
    <div class="two">
        <p>这是一句测试伪元素的文本</p>
    </div>

</body>
</html>
复制代码