我的样式表中有一些链接样式:
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
,但它没有任何影响。
答案 0 :(得分: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. */
}