Telerik RadButton更改选项卡/焦点/活动

时间:2016-05-06 09:31:24

标签: html css button webforms telerik

我在使用带有白色背景和黑色文本的Rad按钮的Web项目时遇到问题。当用户使用Tab键导航页面并选择rad按钮时,文本将以白色突出显示,从而使文本消失在白色背景中。

我试图在radbutton的“active”状态下更改forecolor文本,这是按钮选项卡时使用的CSS类,但我似乎无法更改它。

这是我一直关注的代码,

.RadButton_Metro.RadButton:active {
border: 0px solid #F47B20 !important;
}

.RadButton_Metro.RadButton:focus{
border: 0px solid #F47B20 !important;
}
.RadButton_Metro.RadButton:focus
{
border: 0px solid #F47B20 !important;
}

.RadButton_Metro.RadButton:focus .rbDecorated
{
border: 0px solid #fff !important;
}

任何建议都将不胜感激。

Rad按钮的HTML如下:

 <%--Add New Button--%>
<telerik:LayoutColumn>
 <telerik:RadButton runat="server" 
   ID="addButton" 
   Text="<%$ Resources:Controls, addNewButton %>"
   OnClientClicked="addNew" 
   AutoPostBack="false" 
   Skin="Metro"
   CssClass="button" 
   Icon-PrimaryIconCssClass="glyphicon glyphicon-plus"
   EnableViewState="false">
  </telerik:RadButton>
 </telerik:LayoutColumn>

1 个答案:

答案 0 :(得分:1)

解决方案如下:

.RadButton_Metro.RadButton:focus .rbDecorated
{
    border: 0px solid #fff !important;
    color:black !important;
}