按钮的背景颜色没有通过tab键选择而改变
Background color of the button is not changing through tab key selection
当我将鼠标悬停在按钮上时,背景颜色正在改变,但通过tab键背景颜色不改变
In 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>
你的代码对我来说工作得很好!请看下面的代码:
或者如果你仍然有问题,请在jsFiddle中分享你的完整代码。
看看这个
body {
padding: 50px;
}
.btn-primary {
color: #fff;
background-color: #227ab9;
}
.BtnStyle {
text-transform: uppercase;
font-weight: 700;
border-radius: 4px;
}
.btn-primary:hover,.btn-primary:focus,.btn-primary:active{
background-color: red;// #1a5e8e;
}
<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> Button</button>
</td>
</table>
相关文章:
- Jquery自动完成:如果没有选择任何项目,则使tab键选择第一个项目
- 选择 UI-TAB 的模板
- Ajax Tab - javascript 来检查选择了哪个选项卡
- 用于使用 Tab 键选择项目的事件
- 在按 Tab 键时选择文本区域文本
- 每次按 TAB 键时选择不同的单词
- 不能使用Tab键选择剑道多选的数据
- bootstrap3-typeahead用TAB选择第一个元素
- 用鼠标点击输入和用tab选择有什么区别?
- 如何取消选择文本框的文本,当它得到焦点时,当tab被按下
- 文本框检测输入键后TAB键选择自动补全字
- Angular TAB选择打开新页面,而不是在同一页面中打开
- 按钮的背景颜色没有通过tab键选择而改变
- Zurb foundation 5.2 -在回发时维护TAB选择/状态
- ExtJS 4.2 - Tab 在组合框中选择错误的值,键入快速键入时为 typeAhead:true
- 如何使用 Tab 键选择Zebra_Datepicker
- jQuery选择插件:捕获焦点以在Tab时打开
- Jquery带有下拉选择器的选项卡选择器,下拉选择器不匹配TAB开关
- HTML中的TAB:默认选择第一个TAB
- 剑道多选择与tab键选择