【问题标题】:Html.ActionLink() having the hyperlink underline when mouse over or clickedHtml.ActionLink() 在鼠标悬停或单击时具有超链接下划线
【发布时间】:2020-11-27 23:16:40
【问题描述】:

请问如何在没有下划线的 String LinkText 的情况下使用 html.actionlink()。

下面是 HTML

<div class="w3-bar-item w3-button w3-hover-opacity">
        <i class="fa fa-home w3-xlarge">
            @Html.ActionLink("Home", "Index", "Home", new { area = "" }, new { onclick="showSpinner()"})
        </i>
    </div>

【问题讨论】:

  • 创建一个css类并设置text-decoration: none;?

标签: css asp.net asp.net-mvc twitter-bootstrap w3.css


【解决方案1】:

通过使用Html.ActionLink的样式重载版本

@Html.ActionLink("Link text", "Action name", "Controller name", new { area = "" }, new { Style = "text-decoration:none;"})

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-04-15
    • 2014-09-02
    • 2014-01-18
    • 2013-07-16
    • 2014-04-12
    • 1970-01-01
    • 2020-06-20
    • 2013-05-09
    相关资源
    最近更新 更多