问题描述
我有一个像这样的导航元素......
I have a nav element like so...
我正在使用 Font Awesome 来生成图标.CSS如下:
I am using Font Awesome to generate the icons. The CSS is as follows:
显然,这让我在悬停到 #444 时更改了文本(和图标)颜色.现在我想做的是保留它,但在悬停时将图标更改为不同的颜色.(即文字变为#444,图标在悬停时变为#AE0000)
Obviously this gives me a change of text (and icon) colour on hover to #444. Now what I would like to do, is keep that, but have the icon change to a different colour on hover. (i.e text changes to #444, icons changes to #AE0000 on hover)
我不确定解决它的最佳方法.(对于 CCS/HTML 来说还是很新的,所以非常感谢任何帮助!)
I'm not sure of the best way to tackle it. (Still quite new to CCS/HTML so any help mucho appreciated!)
谢谢!
推荐答案
您想设置悬停在 a
元素内的 icon
类的颜色.
You want to set the color of the icon
class that is inside a hovered a
element.
这篇关于CSS,改变链接中图标字体的悬停效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!