Bootstrap显示内联多个控件

时间:2017-06-21 06:01:41

标签: html css twitter-bootstrap razor

我的Razor显示布局提取了这个摘录:

...more controls here
    <div class="control-group">
     @Html.LabelFor(model => model.BankAccountType, new { @class = "control-label" })
      <div class="controls">
        @Html.DisplayFor(model => model.BankAccountType)
        @Html.DisplayFor(model => model.AccountTypeValid)
      </div>
    </div>
...more controls here

这是我对AccountTypeValid的显示模板:

@model string
@if (Model == "Y")
{
    <i class="fa fa-check"></i>
}
else if (Model == "U")
{
    <i class="fa fa-question"></i>
}

它呈现如下:

fa images appear on a new line

如何让fa图像与文本值一致?

0 个答案:

没有答案