当我悬停此链接时:
<div id="withLibre">
by <%= link_to p.user.username, "#", {class: "username_link"} %><%=time_ago_in_words(p.created_at) %> ago
</div>
...背景颜色是黑色,即使我设置background-color为none或其他颜色。我可以更改color,但不能更改background-color。CSS 在这里展示:
.username_link:hover{
background-color: none;
color: #34DDDD;
text-decoration: none;
}
有什么建议么?