2013-10-23 41 views
0

當瀏覽器大小我必須改變文本框的大小和隱藏存在另一種形象,我看了一些媒體的質疑,我想的實施¿如何在瀏覽器調整大小時使用css調整文本框的大小?

<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

您可以使用百分比width屬性像

<div style="width:100%;background-color:green;"> 
    <input id="Text1" type="text" style="width:80%;"/> 
</div> 
相關問題