asp.net - 如何在 html 菜单中使用箭头标记而不是元素符号

标签 asp.net html css asp.net-mvc-4

我在.cshtml页面中的HTML代码是

 <menu id="menuTools">
        @Html.ActionLink("Test1", "Index", new { Area = "Tools", Controller = "Controller1" })
        @Html.ActionLink("Test2", "Index", new { Area = "Tools", Controller = "Controller2" })
        @Html.ActionLink("Test3", "Index", new { Area = "Tools", Controller = "Controller3" })
    </menu>

我需要在每个菜单前面使用箭头标记而不是元素符号。谢谢。

更新:当我单击特定菜单时,我需要有箭头标记。谢谢。

最佳答案

最简单的方法是给 ul 一个类似的样式

list-style-image:url('/path/to/yourArrow.png');

那么你可能需要使用 列表样式位置:Xpx Ypx; 另外还要将其对齐。请参阅http://www.w3schools.com/cssref/pr_list-style-image.asp

关于asp.net - 如何在 html 菜单中使用箭头标记而不是元素符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12177864/

相关文章:

javascript - 对 CSS 样式表的更改不会反射(reflect)在 Angular.js 按钮中。 JS 重写 CSS 了吗?

javascript - 如何检查带有 bool 值的复选框

javascript - 为什么 innerHtml 不起作用

javascript - 如何 "Eliminate render-blocking JavaScript and CSS in above-the-fold content"

php - 如何使用 Header 滚动到特定 ID?

asp.net - 导出到excel丢失日期格式

c# - 列表框显示两个时间相同的值

c# - 为什么表单中的表单在 Internet Explorer 中不起作用

asp.net - 为什么在 web.config 中设置 customErrors 在这种情况下不起作用?

html - 如何将div定位在屏幕左侧,将所有内容推到右侧