html css伪元素选择器

来源:互联网 发布:js解析url中的参数 编辑:程序博客网 时间:2024/05/16 10:10
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
/*访问前*/
a:link {
    background-color: #000000;
    color: #3399FF;
    font-size:18px;
}
/*访问后*/
a:visited {
    background-color: #CCFF00;
    color: #6699FF;
    font-size: 12px;
    text-decoration:line-through;
}
/*悬停时*/
a:hover {
    background-color: #CCFF00;
    color: #6699FF;
    font-size: 12px;
}
/*点击时*/
a:active {
    background-color: #66CCFF;
    color: #FFFFFF;
    font-size: 16px;
}
/* L V H A为点击后恢复原状态*/
</style>
</head>

<body>
    <a href="http://www.sina.com.cn" target="_blank">hello workd </a>
</body>
</html>