-1

我正在尝试围绕一些文本框控件创建一个组框。到目前为止,这是我的代码:

 <form method="POST" name="frmInfo" id="Info">
        <fieldset class="box-border">
            <legend class="box-border">My Information</legend>
            <div class="row">

                <div class="form-group col-md-4">
                    @Html.LabelFor(m => m.FirstName)
                    @Html.TextBoxFor(m => m.FirstName, new {@class = "form-control"})
                    @Html.ValidationMessageFor(m => m.FirstName)
                </div>
                <div class="form-group col-md-4">
                    @Html.LabelFor(m => m.LastName)
                    @Html.TextBoxFor(m => m.LastName, new {@class = "form-control"})
                    @Html.ValidationMessageFor(m => m.LastName)
                </div>
                <div class="form-group col-md-4">
                    @Html.LabelFor(m => m.Email)
                    @Html.TextBoxFor(m => m.Email, new {@class = "form-control"})
                    @Html.ValidationMessageFor(m => m.Email)
                </div>
            </div>
        </fieldset>
    </form>

呈现页面时,我只看到组名和文本框上方的一行,但没有环绕文本框的组框。我怎样才能解决这个问题?谢谢

4

1 回答 1

0

这可能是因为你class="box-border"覆盖了样式

尝试删除它。我希望它能解决你的问题

于 2016-02-17T07:16:23.870 回答