<form action="" method=""></form> <!--action:控制数据提交的后端路径(给哪个服务端提交数据)--> <!--method指定提交方式:get或者post--> <input type="text" value="普通文本" /> <input type="password" value="密码" /> <input type="date" value="日期" /> <input type="submit" value="用来触发form表单提交数据的动作" /> <input type="button" value="按钮" /> <input type="reset" value="重置内容" /> <input type="radio" value="单选,默认选中要加checked='checked'" /> <input type="checkbox" value="多选" /> <input type="file" value="文件" /> <select name=""> <option>默认单选</option> <option>加mutiple参数变多选</option> <optionselected="">默认选中selected</option> </select> <textarea name="" rows="30" cols="10">文本区域框rows和cols分别设置宽和长</textarea>
<form action="" method="post" class="register"> <span>欢迎新人加入</span> <div> <input type="text" name="user" placeholder="请输入用户名"> </div> <div> <input type="password" name="pwd" placeholder="请输入密码"> </div> <div> <input type="password" name="rpwd" placeholder="请再次输入密码"> </div> <div> <input type="text" name="phone" placeholder="请输入手机号"> </div> <div> <div> <div></div> <input type="submit" class="login100-form-btn" id="sub" value="注册"></input> </div> </div> <div> <input type="checkbox" name="" id="" value="" style=" 15px; height: 15px;"/> <span>同意协议</span> </div> <div> <span>已有账号?<a href="javascript:" class="txt2">去登入</a></span> </div> </form>
<style type="text/css"> *{ margin: 0; padding: 0; } .register{ width: 300px; height: 300px; border: 1px solid red; } #sub{ width: 50px; height: 30px; } div{ margin-top: 10px; margin-left: 60px; } form>span{ color: red; margin-left: 100px; } div input{ border: 1px solid blue; } </style>