<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>
如下爲頁面截圖:
此文內容小,記之,以提醒我時常對學過的點滴進行總結。