如何在css中更改链接上的悬停背景?

时间:2014-10-15 00:37:42

标签: html css

当您将鼠标悬停在某个链接上时,它会显示如下背景:

enter image description here

但我希望它看起来像这样:

enter image description here

我目前正在使用JSF Framework进行Maven / Web应用程序项目。链接由<h:link>生成。在常规的html / css中,它很容易让它看起来像第二张图片,但它不适用于JSF。我该怎么办?

1 个答案:

答案 0 :(得分:0)

这个的CSS将是

element:hover{
background: none;
text-decoration: underline;}

将元素替换为该html元素的类或id。