【发布时间】:2019-06-02 11:18:10
【问题描述】:
我有一个文本框,我需要在其中添加一个符号。这个符号应该总是可见的,而不是在后面的代码中使用(当获取文本框的值时)——基本上就像一个 glymphicon 图标。我试过使用跨度,但它没有按应有的方式显示。
这就是我所做的:
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon"><b>$</b></i></span>
@Html.TextBoxFor(m => m.AgreedValue, new { @class = "form-control", placeholder = "Agreed Value" })
</div>
这是它当前的显示方式:
这就是我需要它显示的内容:
我有什么遗漏吗?或者我怎样才能让它看起来像第二张图片?
【问题讨论】:
标签: css asp.net-mvc asp.net-mvc-4 bootstrap-4