文本阴影和超链接伪类
html代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<link rel="stylesheet" href="css/style.css">
<body>
<p>
<img src="image/a.png" alt="">
</p>
<a>
《黄金时代》
</a>
<br>
<a>
作者:王小波
</a>
<br>
<a class="price"href="">
59元
</a>
</body>
</html>
css代码
a{
text-decoration: none;
color: yellow;
}
/*访问前*/
a:link{
background: black;
}
/*访问后*/
a:visited{
background: gray;
}
/*鼠标指针悬浮时*/
a:hover{
background: deepskyblue;
}
/*鼠标点击时*/
a:active{
background: green;
}
/*文本阴影*/
.price{
text-shadow: black 10px 10px 1px;
}
测试访问:
鼠标指针悬浮:
鼠标指针点击时
点击后