gpt4 book ai didi

html - 无法更改 div 内的链接颜色

转载 作者:可可西里 更新时间:2023-11-01 13:30:48 24 4
gpt4 key购买 nike

我正在为一个小型网站使用 Bootstrap3,我需要更改其中一个 div 中的链接颜色。

但是,由于某些原因,始终应用 Bootstrap 链接颜色而不是我自定义的颜色。

CSS:

.social a,
.social a:hover,
.social a:focus {
color: #fefefe;
}

HTML:

<div class="social">
<a href="#"><i class="fa fa-linkedin"></i></a>
</div>

我也试过这个:

.social > a,
.social > a:hover,
.social > a:focus {
color: #fefefe;
}

但没有什么不同。

最佳答案

#fefefe 是白色。也许您在白色背景上有白色内容。它应该有效。

body {
background-color: darkgrey;
}

.social a,
.social a:hover,
.social a:focus {
color: #fefefe; // white
}

Example

关于html - 无法更改 div 内的链接颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30417302/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com