简体   繁体   English

CSS无效的属性值(引导程序)-字体悬停颜色

[英]CSS Invalid Property Value (Bootstrap) - Font Hover Color

a {
  color: #E0E0E0 !important;
}
.navbar-default .navbar-nav>li>a:hover {
  color: #171F26B !important;
}

Currently trying to create my own website and I'm running with some troubles trying to get the navigation item hover to work. 当前正在尝试创建自己的网站,而我在尝试使导航项悬停工作时遇到了一些麻烦。 I keep coming up with 'Invalid Property Value'. 我不断提出“无效的财产价值”。

I've tried targeting several classes and tags in different ways, but it ultimately doesn't work. 我尝试以不同的方式定位多个类和标签,但最终无法正常工作。 I've also tried being very specific as you can tell from the code above, however that isn't working either. 从上面的代码可以看出,我也尝试过非常具体,但是这也不起作用。

I understand that sometimes we may use !important to give a CSS property priority so it may override bootstrap. 我知道有时候我们可以使用!important来赋予CSS属性优先级,以便它可以覆盖引导程序。

You've got a typo in your color value. 您的颜色值有错别字。 Hexadecimal colors have six letters; 十六进制颜色有六个字母。 #171F26B has one letter too many. #171F26B的一个字母太多。

a {
  color: #E0E0E0 !important;
}
.navbar-default .navbar-nav>li>a:hover {
  color: #171F26B !important;
}

Reduce the color code by 1 on: color: #171F26B !important; 在以下color: #171F26B !important;颜色代码减少1: color: #171F26B !important;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM