gpt4 book ai didi

javascript - 按钮的背景颜色不会通过 Tab 键选择而改变

转载 作者:太空宇宙 更新时间:2023-11-04 11:40:53 24 4
gpt4 key购买 nike

当我通过鼠标指针悬停在按钮上时,背景颜色会发生变化,但通过 Tab 键背景颜色不会改变。

在 html 中

<style>
.btn-primary {
color: #fff;
background-color: #227ab9;
border: none;
cursor: pointer;
}
.BtnStyle {
text-transform: uppercase;
font-weight: 700;
border-radius: 4px;
}
.btn-primary:hover,.btn-primary:focus,.btn-primary:active{
background-color: #1a5e8e;

}
</style>

<table>
<td><input id="txt" class="" type="text" value=""></td>
<td id="go" class="BtnStyle btn-primary" >
<button class="btn-primary"><i class="fa fa-chevron-save" aria-hidden="true"></i>test</button>
</td>
</table>

最佳答案

<style>
.btn-primary {
color: #fff;
background-color: #227ab9;
border: none;
cursor: pointer;
}
.BtnStyle {
text-transform: uppercase;
font-weight: 700;
border-radius: 4px;
}
.btn-primary:hover,.btn-primary:focus,.btn-primary:active{
background-color: #1a5e8e;

}
</style>

<table>
<td><input id="txt" class="" type="text" value=""></td>
<td id="go" class="BtnStyle btn-primary" >
<button class="btn-primary"><i class="fa fa-chevron-save" aria-hidden="true"></i>test</button>
</td>
</table>

关于javascript - 按钮的背景颜色不会通过 Tab 键选择而改变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31333993/

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