我的整个网站都有一个 css 文件。例如,在该 css 文件中,我为所有参考链接定义了以下样式,例如:
a{
color: #333;
padding-right: 3px;
padding-left: 3px;
text-decoration: underline;
outline-width: medium;
outline-style: none;
outline-color: invert;
}
a:link, a:visited, a:active, a:hover{
color: #333;
}
所以我网站中的所有链接都有上述样式,但是我的页面中只有三个链接我不想应用这种样式,我的意思是,我想忽略它以便不应用,那么如何忽略样式下面的链接?
<nav id="NavigationMenu">
<ul id="menu">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>
</nav>
更新:
<div id="flagsGroup">
<div id="flag">
<a href="@Url.Action("ChangeCulture", "Home", new { lang = "es-ES", returnUrl = this.Request.RawUrl })"><img src="~/images/SpanishFlag.png" alt="Change page language to spanish."/></a>
<a href="@Url.Action("ChangeCulture", "Home", new { lang = "ca-ES", returnUrl = this.Request.RawUrl })"><img src="~/images/CatalanFlag.png" alt="Change page language to catalan."/></a>
<a href="@Url.Action("ChangeCulture", "Home", new { lang = "en-GB", returnUrl = this.Request.RawUrl })"><img src="~/images/BritishFlag.png" alt="Change page language to english."/></a>
</div>
</div>