2016-12-04 207 views
-1

如何更改默认Bootstrap链接悬停颜色为自定义颜色?如何将默认Bootstrap链接悬停颜色更改为自定义颜色?

看来,铬检查器(DOM)不采取我的CSS代码(即使与!重要)。如何将我的网站上传到网络时使用我的代码?

这是我的CSS:

a { 
    color: hsla(34,55%,54%,1); 
} 

footer > a: hover { 
    color: hsla(151,27%,56%,1) !important; 
} 

这是我的HTML:

<footer class="col-sm-12"> 
      <address> 
       <a href="privacy-policy.html">Privacy Policy</a> | © 2014 Colostomo | <a href="about.html">About This Site</a> <br> Colostomo • 1000 Main Street • Marshall, MO 65340 • 660-555-1212 
      </address> 
     </footer> 
+2

'页脚>答:hover'应该有一个'之间没有空格:'和'hover'。它应该是。 '页脚> a:悬停' –

+1

**这是一个错字。请关闭这个,而不是回答。**':)' –

+1

这是错字。应该关闭 –

回答

0

使用页脚>地址>答:悬停代替页脚>答:悬停,因为页脚没有孩子a。

a { 
 
    color: hsla(34,55%,54%,1); 
 
    
 
} 
 

 
footer > address >a:hover { 
 
    color: hsla(151,27%,56%,1) !important; 
 

 
}
<footer class="col-sm-12"> 
 
      <address> 
 
       <a href="privacy-policy.html">Privacy Policy</a> | © 2014 Colostomo | <a href="about.html">About This Site</a> <br> Colostomo • 1000 Main Street • Marshall, MO 65340 • 660-555-1212 
 
      </address> 
 
     </footer>

+0

非常感谢!我会做出这些改变:) – lexi

+1

或'footer a:hover {}'。 –