Html 如何将预定义样式指定给asp:BulletedList链接

Html 如何将预定义样式指定给asp:BulletedList链接,html,asp.net,css,bulletedlist,Html,Asp.net,Css,Bulletedlist,我的样式表中有一些链接样式: a.whiteLinks { color: #FFFFFF; text-decoration: none; } a.blueLinks { color: #0076AC; text-decoration: none; } a.whiteLinks:hover { color: #5397AD; text-decoration: none; } a.blueLinks:hover { color: #5397AD

我的样式表中有一些链接样式:

a.whiteLinks {
    color: #FFFFFF;
    text-decoration: none;
}
a.blueLinks {
    color: #0076AC;
    text-decoration: none;
}
a.whiteLinks:hover {
    color: #5397AD;
    text-decoration: none;
}
a.blueLinks:hover {
    color: #5397AD;
    text-decoration: none;
}
我有以下
asp:BulletedList

<asp:BulletedList DisplayMode="HyperLink" runat="server" ID="blFirst" ClientIDMode="Static">
     <asp:ListItem Value="allergy.aspx">Allergy and Immunology</asp:ListItem>
     <asp:ListItem Value="">Anesthesiology</asp:ListItem>
     <asp:ListItem Value="">Breast Surgery</asp:ListItem>
</asp:BulletedList>

过敏与免疫学
麻醉学
乳房手术
我可以在哪里进行编辑,以便项目符号列表中的链接使用
blueLink
样式而不是默认样式

我试图在项目列表中添加
CssClass=“blueLinks”
,但没有任何效果。

将类更改为

.blueLinks li a {
   color: #0076AC;
   text-decoration: none;
}
并调整悬停,使你也有正确的方式映射

 .blueLinks li a:hover {
     color: #5397AD;
     outline:none; /* add this. ASP has the bad habit of adding outline to links in IE */
     text-decoration: none; /* You don't need this.  */
  }

我的页面上的
a
链接也使用了相同的样式,并且希望此特定项目符号列表使用相同的样式。我从
a.blueLinks
改为
.blueLinks
,但没有用。仍然没有改变样式。你能提取html和css并在fiddle中发布吗?您是否静态地(在ASP之外)尝试过它。我非常肯定,通过正确的方法绘制特定性的路线,可以做到这一点。如果不知道还有什么,很难说它不会正确呈现,因为它是ASP代码,我会检查它是否在没有ASP的情况下工作…对,你需要粘贴源代码。在浏览器中运行它,并在源代码中找到问题区域,将其粘贴到FIDLE中。它将为使用该类的列表中的每个链接创建一个链接。如果希望它应用于所有a链接,只需将该类中的那些属性添加到reset.css中,其中a{code here}是