我必须在调整浏览器大小时更改文本框的大小并隐藏另一个存在的图像,我读了一些媒体查询,我正在尝试实现
<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>
答案 0 :(得分:0)
你可以使用百分比宽度属性,如
<div style="width:100%;background-color:green;">
<input id="Text1" type="text" style="width:80%;"/>
</div>