如何在没有 link 布局的情况下显示 link 文本?
How to show a link text without a link layout?
在我的网站上,我想通过单击名称跳转到另一个页面。那很好用。但我想在相同的 class 定义下显示名称。没有蓝色文本,也没有下划线。你怎么做到的?
<td class="titel_artiest"> <%: item.Titel%><br />
<a class="titel_artiest" href="<%= Url.Action("Index", "Hitdossier", new { AArtiest = item.Artiest }, null) %>"><%: item.Artiest %></a></td>
这是一个 css 问题,而不是 C# 问题。
只需编辑网站的相关 css 以包含如下内容:
a.titel_artiest {
text-decoration:none:
color: #000; // replace with correct color
// etc
}
请注意此处的 a.
- 您的问题可能是您当前为样式定义了一些其他元素类型(如 div
、span
或 ul
) class titel_artiest
,但不是 link 标签 a
.
在我的网站上,我想通过单击名称跳转到另一个页面。那很好用。但我想在相同的 class 定义下显示名称。没有蓝色文本,也没有下划线。你怎么做到的?
<td class="titel_artiest"> <%: item.Titel%><br />
<a class="titel_artiest" href="<%= Url.Action("Index", "Hitdossier", new { AArtiest = item.Artiest }, null) %>"><%: item.Artiest %></a></td>
这是一个 css 问题,而不是 C# 问题。
只需编辑网站的相关 css 以包含如下内容:
a.titel_artiest {
text-decoration:none:
color: #000; // replace with correct color
// etc
}
请注意此处的 a.
- 您的问题可能是您当前为样式定义了一些其他元素类型(如 div
、span
或 ul
) class titel_artiest
,但不是 link 标签 a
.