gpt4 book ai didi

html - 悬停时字体颜色不会改变

转载 作者:太空宇宙 更新时间:2023-11-04 15:54:56 25 4
gpt4 key购买 nike

我有这个登录按钮,看起来像这样:

enter image description here

现在当我将鼠标悬停在它上面时,它看起来像这样:

enter image description here

当我将鼠标悬停在上面时,我无法将文本变白

我的代码:

.button {
border: 0px solid #011f4b;
background: #011f4b;
padding: 3px 21px;
-webkit-border-radius: 16px;
-moz-border-radius: 16px;
border-radius: 16px;
color: #ffffff;
font-size: 12px;
font-family: Questrial;
text-decoration: none;
vertical-align: middle;
letter-spacing: 2px;
}

.button:hover {
border: 0px solid #1292e1;
background: #1292e1;
color: white;
}

.button:active {
background: #1292e1;
color: #fff;
}
<a href='#' class='button'>Login</a>

最佳答案

尝试添加! !important 如果有另一个 css 代码将悬停时的颜色设置为另一个颜色,它将强制颜色为白色

关于html - 悬停时字体颜色不会改变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46572093/

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