<分区>
<分区>
如何将默认的 Bootstrap 链接悬停颜色更改为自定义颜色?
chrome 检查器 (DOM) 似乎没有接受我的 CSS 代码(即使有 !important)。将我的网站上传到网络时如何使用我的代码?
这是我的 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>
最佳答案
使用footer>地址>a:hover而不是footer>a:hover,因为footer没有子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>
关于jquery - 如何将默认的 Bootstrap 链接悬停颜色更改为自定义颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40955874/