HTML中input type="text"和type="password" 显示的长度不一样

来源:互联网 发布:windows下的linux终端 编辑:程序博客网 时间:2024/05/16 15:03

来自:http://zhidao.baidu.com/link?url=lXi1lGs_lpxBcwUtE0aHfclXy1l3_DbKpyQbXlvt7sA_F9hdc7oFU5kAqkxb3yRNYLqzrO7FOwV3vZ8DwCHE9a

1:

<p>设备码&nbsp;&nbsp;<input type="text" name="mac" style="width:150px"/></p>
<p>密备码&nbsp;&nbsp;<input type="password" name="pwd"  style="width:150px"/></p>

2:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
.inputcss
{
 width:150px;height:20px;
}
</style>
</head>

<body>
<p>设备码&nbsp;&nbsp;<input type="text" name="mac" class="inputcss"/></p>
<p>密备码&nbsp;&nbsp;<input type="password" name="pwd"  class="inputcss"/></p>
</body>
</html>


0 0
原创粉丝点击