我想将“新服务请求”的按钮文本更改为白色。请指教。
.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/