<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style type="text/css">
a:link,a:visited{
display: block;
font-weight: bold;
color: white;
background-color: gray;
width: 60px;
padding: 4px;
text-align: center;
text-decoration: none;
}
a:hover,a:active{
color: orange;
}
</style>
</head>
<body>
<a href="http://www.jianshu.com">简书</a>
</body>
</html>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1.链接样式,链接样式可以使用任意css属性,如颜色,背景等;
2.链接的四种状态
• a:link - 正常未访问过的链接;
• a:visited - 用户已经访问过的链接;
• a:hover - 鼠标悬停在链接上时;
• a:active - 链接被点击时;
3.a:hover必须跟在a:link,a:visited后面;a:active必须跟在a:hover后面
正常
悬停
网友评论