form/label/input登录
2017-11-20 本文已影响0人
富有的心
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
body {
background: url(images/bg.jpg) no-repeat;
padding: 0;
margin: 0;
width: 1003px;
height: 669px;
}
#apDiv1 {
position: absolute;
width: 428px;
height: 182px;
z-index: 1;
left: 45px;
top: 125px;
}
</style>
</head>
<body>
<div id="apDiv1">
<form id="form1" name="form1" method="post" action="">
<h2>网站登录</h2>
<label for="user">用户名</label>
<input type="text" name="user" id="user">
<br>
<!-- label的for属性绑定了input的id属性,点击这个label就可以响应for属性值对应的具有相同id属性值的元素 -->
<label for="pass">密 码</label>
<input type="password" name="pass" id="pass">
</form>
</div>
</body>
</html>
input标签的type属性对应的值有:
button
checkbox
file
hidden
image
password
radio
reset
submit
text
6D5D7453-EEC7-40F4-8A8F-01AE11F06D86.png