0

当浏览器调整大小并隐藏另一个存在的图像时,我必须更改文本框的大小,我阅读了一些媒体查询,我正在尝试实现

<fieldset>
             <p>
               if you don't have an account ... click 
              <a>@Html.ActionLink("here", "Index", "Home", routeValues: null, htmlAttributes: new { @class = "registerLink" })</a>
              and get register now       
       </p>
            <legend>Log in Form</legend>
            <ol>
                <li>
                    @Html.LabelFor(m => m.Email)
                    @Html.TextBoxFor(m => m.Email)
                    @Html.ValidationMessageFor(m => m.Email)

                </li>
                <li>
                    @Html.LabelFor(m => m.Password)
                    @Html.PasswordFor(m => m.Password)

                </li>
                <li>
                    @Html.CheckBoxFor(m => m.RememberMe)
                    @Html.LabelFor(m => m.RememberMe, new { @class = "checkbox" })
                </li>
            </ol>
            <section class="contentInput">
                <input id="submint" type="submit" value="accept" style="width:100px;" />
            </section>

        </fieldset>
4

1 回答 1

0

您可以按百分比使用宽度属性,例如

<div style="width:100%;background-color:green;">
    <input id="Text1" type="text"  style="width:80%;"/>
</div>
于 2013-10-23T17:52:42.917 回答