<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>
如下为页面截图:
此文内容小,记之,以提醒我时常对学过的点滴进行总结。