make< li>悬停时改变颜色 [英] make <li> change color on hover
本文介绍了make< li>悬停时改变颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经实现了一个非画布菜单。我想让整个< li>
在悬停时更改颜色,但只有文字正在改变颜色。我该怎么办?
I have implemented an off-canvas menu. I want to make the whole <li>
change color on hover but only the text are changing color. How can i do so?
请在这里查看完整代码:
PLease check the full code here:
https://jsfiddle.net/nia24/u7gLwx49/
推荐答案
小提琴中没有班级菜单,所以:
There's no class menu in the fiddle, so:
<ul id="toggle" class="menu">
并注意 li 和之间的空格:hover :
.menu li:hover{
background: #00ff99;
}
现在,它有效: https://jsfiddle.net/u7gLwx49/1/
这篇关于make< li>悬停时改变颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文