我试图让不同的图像显示锚标签的不同状态,但我无法让它工作。关于我在这里缺少什么的任何想法?
这是图片 => 不允许我发布图片,但它是 480x30 像素
这是CSS;
a.image {
background-repeat:no-repeat;
color:white;
display:inline-block;
width:160px;
height:30px;
margin-left:-12px;
margin-top:16px;
padding-top:6px;
text-align:center;
font-size:14px;
font-weight:bold;
cursor:pointer;
text-decoration:none;
}
a.image:link {
background-image:url('images/buttons.png');
background-position:0px 320px;
}
a.image:visited {
background-image:url('images/buttons.png');
background-position:0px 0px;
}
a.image:active {
background-image:url('images/buttons.png');
background-position:0px 160px;
}
这是HTML;
<a href='ifp.asp?width=1512&ProjectGroupID=&ProductID=536&model=Addison 536&plan=Lower Level Plan' class='image'>Lower Level Plan</a>
我目前只得到白色文本的“低级计划”。谢谢!