悬停a时,图标颜色会发生变化 [英] Glyphicon change color when hover a
本文介绍了悬停a时,图标颜色会发生变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何使它工作,以便当我悬停我的李>它也改变我的图形颜色。我聆听了我的html以及我在尝试中做了什么。但是这只会改变它如果我徘徊在glyphicon而不是a。而是我也尝试在我的a上进行更改,但这不会影响我的图形。
b$ b
< li class =pushy-item>
< a href =#>历史记录
< span>< / span>历史记录
< / a>
< / li>
Css:
ul> li> a> 。glyphicon:悬停{
颜色:橙色;
}
`
解决方案
您可以试试这个:
ul> li> a:悬停> 。glyphicon
How can i make it work so that when i hover my li > a it also changes color on my glyphicon. I have listede below my html and what i tryed to do in css. But that does only change it if i hover the glyphicon and not the a. And yes i have also tryed to change it on my a but that dosen't effect my glyphicon.
Html:
<li class="pushy-item">
<a href="#">History
<span class="glyphicon glyphicon-list-alt opacityDown pull-right"></span>
</a>
</li>
Css:
ul > li > a > .glyphicon:hover{
color: orange;
}
`
解决方案
You can try this:
ul > li > a:hover > .glyphicon
这篇关于悬停a时,图标颜色会发生变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文