[英]Hover effect in <ul> <li> list with Headings
我有一个<ul>
<li>
列表,其中HELP,MISC和POLICIES是没有<a>
标记的标题。 其他<li>
元素具有font-size:16px
(正常大小为14px)的hover
效果。
我如何删除标题的hover
?
您可以使用
.footer_ul li.bold1:hover {
font-size:14px;
text-decoration:none;
}
删除标题的悬停
或者,您可以使用.footer_ul li a:hover
在.footer_ul li:hover
.footer_ul li a:hover {
text-decoration:underline;
font-size:16px;
}
I checked you fiddle it was good.
The only change you need to make is you have to add :hover class for a tag and not li tag
`
.footer_ul li a:hover {
text-decoration:underline;
font-size:16px;
}
`
使用:not()
选择器。 像这样需要一个更改。
.footer_ul li:hover:not(.bold1) {
text-decoration:underline;
font-size:16px;
}
在“ .footer_ul li:hover”之后添加此CSS
.footer_ul li:hover:first-child {
text-decoration:none;
font-size:14px;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.