`
buliedian
  • 浏览: 1197821 次
  • 性别: Icon_minigender_2
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

通过样式调整input 中password text默认长度

 
阅读更多
原始出处
<input > 标签内的 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 >
以下为页面截图:

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics