html - css不申请asp.net超链接

标签 html asp.net css hyperlink hover

在我的asp.net 应用程序中,有一个超链接。当我使用 css 将鼠标悬停在它上面时,我想将它的 color 更改为白色,但它不起作用。

<asp:HyperLink ID="hlViewItem" class="hplClass" runat="server"  NavigateUrl='<%#Eval("Pro_Id","ProductDetails.aspx?ProID={0}") %>' ForeColor="#33ccff">View Item</asp:HyperLink>

我的 css:

.hplClass:hover
{
    color:white;
}

最佳答案

对于 ASP.NET 控件,使用属性 CssClass 而不是“类”。

关于html - css不申请asp.net超链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22182797/

相关文章:

javascript - 移动网站 : -webkit-overflow-scrolling: touch conflicts with position:fixed

javascript - 将文本拆分为页面并单独呈现 (HTML5)

css - 不同高度的动画元素在 CSS 中以相同的速度增长

javascript - 在 jQuery 中对元素属性使用简写赋值

html - 如何在 html 列表中的文本后面添加箭头?

html - W3C 无法检查实时站点 : error "403 ok"

c# - 访问<asp :FormView> field value from code behind.

javascript - asp.net 中撇号的编码字符串

html - 将标签添加到 Divy 侧边导航

asp.net - 以编程方式为整个应用程序设置母版页