【问题标题】:Telerik RadButton change text colour on tab/focus/activeTelerik RadButton 更改选项卡/焦点/活动上的文本颜色
【发布时间】:2016-05-06 09:31:24
【问题描述】:

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

我试图更改 radbutton 的“活动”状态的前景色文本,这是按钮被选项卡时使用的 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>

【问题讨论】:

  • 请也发布您的 html 部分。

标签: html css button webforms telerik


【解决方案1】:

解决方法如下:

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

【讨论】:

    猜你喜欢
    • 2022-01-20
    • 2018-03-26
    • 1970-01-01
    • 2016-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-12
    • 1970-01-01
    相关资源
    最近更新 更多