如何在左侧放置 kendo 复选框标签
how to place a kendo check box label on the left
我有以下代码和平:
@(Html.Kendo().CheckBoxFor(m => m.IsActive).Label("Active:"))
我希望标签位于左侧而不是右侧。有人可以帮我吗?
这不能单独使用 Html 助手来完成,因为它总是将它放在右边。如本link所述:http://www.telerik.com/forums/checkbox-label-before-checkbox-input
The Kendo UI checkbox styling requires the rendering to have first the
checkbox, then the label tag, so that the latter can be styled, based
on the checkbox state
要让它在左侧,您可以省略助手中的标签,并在它之前单独添加标签元素到您的页面,例如:
<label for="@Model.IsActive">Active:</label>
@(Html.Kendo().CheckBoxFor(m => m.IsActive))
我有以下代码和平:
@(Html.Kendo().CheckBoxFor(m => m.IsActive).Label("Active:"))
我希望标签位于左侧而不是右侧。有人可以帮我吗?
这不能单独使用 Html 助手来完成,因为它总是将它放在右边。如本link所述:http://www.telerik.com/forums/checkbox-label-before-checkbox-input
The Kendo UI checkbox styling requires the rendering to have first the checkbox, then the label tag, so that the latter can be styled, based on the checkbox state
要让它在左侧,您可以省略助手中的标签,并在它之前单独添加标签元素到您的页面,例如:
<label for="@Model.IsActive">Active:</label>
@(Html.Kendo().CheckBoxFor(m => m.IsActive))