<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body{
margin: 0px;
}
.box{
width: 400px;
height: 460px;
padding-top: 20px;
padding-left: 20px;
padding-right: 20px;
background: #f2f2f2;
}
.box label{
float: left;
width: 80px;
text-align: right;
}
.box h3{
margin: 0px;
line-break: 49px;
}
#i1{
width: 240px;
height: 24px;
}
#t1{
height: 100px;
width: 240px;
}
#p1{
padding-left: 80px;
}
/* #p2{
padding-left: 31px;
} */
</style>
</head>
<body>
<div class="box">
<form action="">
<h3>注册表单</h3>
<hr>
<p id="p2"><label for="">姓名:</label>
<input type="text" id="i1" name="usename" placeholder="输入姓名">
</p>
<p id="p2">
<label for="">密码:</label>
<input type="password" id="i1" name="password" placeholder="密码不能为空">
</p>
<p id="p2">
<label for="">性别:</label>
<input type="radio" name="gender" id="0" checked="checked">男
<input type="radio" name="gender" id="1">女
</p>
<p id="p2">
<label for="">爱好:</label>
<input type="checkbox" name="" id="">唱歌
<input type="checkbox" name="" id="">跑步
<input type="checkbox" name="" id="">游泳
</p>
<p id="p2">
<label for="">照片:</label>
<input type="file" name="" id="">
</p>
<p>
<label for="">个人描述:</label>
<textarea name="" id="t1" cols="30" rows="10"></textarea>
</p>
<p id="p2">
<label for="">籍贯:</label>
<select name="" id="">
<option value="0">北京</option>
<option value="1">上海</option>
<option value="2">深圳</option>
<option value="3">广州</option>
</select>
</p>
<p id="p1">
<input type="submit" value="提交">
<input type="reset" value="重置">
</p>
</form></div>
</body>
</html>
表单的制作 css+heml5
最新推荐文章于 2024-05-15 20:11:52 发布