Home >Web Front-end >HTML Tutorial >Adjust the default length of password text in input through style_html/css_WEB-ITnose
Original source
3a51f7a23cedd4d0ea1dfd9aced9538f When the type in the tag is password and text respectively, the default length and width are inconsistent, which is often required when making a login box Make their length and width consistent. The following method can be controlled through css to make it consistent:
<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>