gpt4 book ai didi

javascript - 如何更改按钮中的文字颜色

转载 作者:行者123 更新时间:2023-11-30 13:46:35 26 4
gpt4 key购买 nike

我想将“新服务请求”的按钮文本更改为白色。请指教。

.btn-info { background: #0066cc; border: none; border-radius: 3px; font-size: 18px; padding: 10px 20px; }

.btn-info:hover{

background: #003366;

transition: 0.5s background;}
<button class="btn-info"> <a href="LINK">New Service Request</a></button>

最佳答案

您需要将按钮内 a 标签的颜色设置为白色。

例子:

.btn-info {
background: #0066cc;
border: none;
border-radius: 3px;
font-size: 18px;
padding: 10px 20px;
}

.btn-info:hover {
background: #003366;
transition: 0.5s background;
}

.btn-info a {
color: white;
}
<button class="btn-info"> <a href="LINK">New Service Request</a></button>

关于javascript - 如何更改按钮中的文字颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59206171/

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