您的位置:首页 > Web前端 > CSS

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

2015-07-26 15:11 344 查看
原文出处

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


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: