0

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

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"BulletedList但没有任何影响。

4

1 回答 1

1

将课程更改为

.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.  */
  }

*你的小提琴*

于 2014-03-31T14:41:20.563 回答