Asp.net mvc MVC Html.LabelFor工具提示
尝试了解如何在图标和文本之间添加更多的空间Asp.net mvc MVC Html.LabelFor工具提示,asp.net-mvc,html-helper,Asp.net Mvc,Html Helper,尝试了解如何在图标和文本之间添加更多的空间 <td>@Html.LabelFor(m => m.MiscellaneousSettings.StudentPhotoUrl, new { @class = "fa fa-question-circle", Title = "SomeTooltips" }) </td> @Html.LabelFor(m=>m.misscellaneoussettings.StudentPhotoUrl,新的{@class=“fa-fa
<td>@Html.LabelFor(m => m.MiscellaneousSettings.StudentPhotoUrl, new { @class = "fa fa-question-circle", Title = "SomeTooltips" }) </td>
@Html.LabelFor(m=>m.misscellaneoussettings.StudentPhotoUrl,新的{@class=“fa-fa-question-circle”,Title=“SomeTooltips”})
正如您所看到的,它非常接近:
在学生照片URL前添加一个空格
<td>@Html.LabelFor(m => " " + m.MiscellaneousSettings.StudentPhotoUrl, new { @class = "fa fa-question-circle", Title = "SomeTooltips" }) </td>
@Html.LabelFor(m=>“”+m.mischellaneoussettings.StudentPhotoUrl,新的{@class=“fa-fa-question-circle”,Title=“SomeTooltips”})
在学生照片URL前添加空格
<td>@Html.LabelFor(m => " " + m.MiscellaneousSettings.StudentPhotoUrl, new { @class = "fa fa-question-circle", Title = "SomeTooltips" }) </td>
@Html.LabelFor(m=>“”+m.mischellaneoussettings.StudentPhotoUrl,新的{@class=“fa-fa-question-circle”,Title=“SomeTooltips”})
在css中添加以下内容:
label.fa:before {
margin-right: 5px;
}
这将导致:
请参阅。将此添加到css中:
label.fa:before {
margin-right: 5px;
}
这将导致:
请参阅。也很好用,但是css路径将适用于我的所有图标-谢谢!也很好,但是css路径将适用于我的所有图标-谢谢