码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-07-26 15:34:25      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:

原创出处

<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> 

 

技术分享

 

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

标签:

原文地址:http://www.cnblogs.com/quixon/p/4677730.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!