首頁  >  文章  >  web前端  >  通过样式调整input 中password text默认长度_html/css_WEB-ITnose

通过样式调整input 中password text默认长度_html/css_WEB-ITnose

WBOY
WBOY原創
2016-06-24 11:40:171102瀏覽

原创出处

标签内的type分别为password和text时其默认长度和宽度不一致,而在做登陆框时往往需要将它们的长度和宽度设置一致。如下的方法可以通过css控制使其一致:

<html> <head></head> <body> 调整前:</br> 用户名:<input type="text" id="tex"></br> 密  码:<input type="password"    id="pass"></br></br> 调整后:</br> 用户名:<input type="text"    style="width:180px;height:20px;" id="tex"></br> 密  码:<input type="password"    style="width:180px;height:20px;" id="pass"> </body> </html> 

 

 

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn