1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>注册表单</title> 6 <style type="text/css"> 7 body 8 { 9 border: double; 10 } 11 h2 12 { 13 color: red; 14 font-family: 宋体; 15 } 16 </style> 17 </head> 18 <body class="mybody"> 19 <form action="formz_action.asp" method="get"> 20 <!-- action标签是提交后跳转的页面(携带用户输入的信息做为参数) method:传递参数的方式 (get/post) maxlength:支持文字的最大长度 placeolder:空白输入保持内容 21 --> 22 <h2>欢迎来到注册界面</h2> 23 <p> 24 用户: 25 <input type="text" name="user"> 26 <br /> 27 密码: 28 <input type="password" name="password" maxlength="16" placeholder="最多16位"> 29 <br /> 30 确认密码: 31 <input type="password" name="password" maxlength="16" placeholder="最多16位"> 32 <p> 33 </p> 34 爱好:<br /> 35 看小说 36 <input type="checkbox" name="Novel"><br /> 37 追剧 38 <input type="checkbox" name="Theatergoing"><br /> 39 运动 40 <input type="checkbox" name="Exercise"><br /> 41 音乐 42 <input type="checkbox" name="music"><br /> 43 其余 44 <input type="checkbox" name="Else"> 45 </p> 46 <p> 47 性别:<br /> 48 男 49 <input type="radio" checked="checked" name="Sex" value="male" /> 50 <br /> 51 女 52 <input type="radio" name="Sex" value="female" /> 53 </p> 54 55 <input type="submit" value="注册"><br /> 56 <input type="reset" value="重置" > 57 58 </form> 59 60 61 </body> 62 </html>
做为一个才在学web前端的小白,今天写了一个简陋的注册表单,分享一下,哈哈哈css