希望实现这样的效果,当一个链接被访问过后,链接区域出现一个特定背景图,以向用户突显其被访问过的特征。但是始终无法正确显示。
补充:如果将背景图挪到hover中可以看到背景图,但是放在visited中始终无效
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<title>document</title>
<style type="text/css">
a{
display: inline-block;
}
a:link{
background-color: #0f0;
}
a:hover{
text-decoration: none;
border:1px solid #ccc;
/*放置在hover中能看到*/
/*background: url("images/ok1.png") no-repeat 0 0 ;*/
}
a:visited{
text-decoration: none;
background: url("images/ok1.png") no-repeat 0 0 ;
/* background-color: #00f; */ /*背景色能看到*/
}
.circle{
width: 50px;
height: 50px;
border-radius: 50%;
line-height: 50px;
text-align: center;
}
</style>
</head>
<body>
<div>This is a <a href="#" class="circle">link</a></div>
</body>
</html>橋本奈奈未