Blogger Information
Blog 3
fans 0
comment 2
visits 1670
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
表格和表单的使用
织网虾
Original
609 people have browsed it

11.10 表格和表单的使用

个人简历

效果图

html代码
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>个人简历</title>
  8. <link rel="stylesheet" href="css/index.css">
  9. </head>
  10. <body>
  11. <table>
  12. <tr class="blue">
  13. <td colspan="5"></td>
  14. </tr>
  15. <tr class="title">
  16. <td colspan="5">------基本资料------</td>
  17. </tr>
  18. <tr>
  19. <td class="tcenter">姓&nbsp;&nbsp;&nbsp;&nbsp;名</td>
  20. <td>织网虾 </td>
  21. <td class="tcenter">性&nbsp;&nbsp;&nbsp;&nbsp;别</td>
  22. <td></td>
  23. <td rowspan="7"></td>
  24. </tr>
  25. <tr>
  26. <td class="tcenter">学&nbsp;&nbsp;&nbsp;&nbsp;历</td>
  27. <td>大学</td>
  28. <td class="tcenter">身&nbsp;&nbsp;&nbsp;&nbsp;高</td>
  29. <td>199cm</td>
  30. </tr>
  31. <tr>
  32. <td class="tcenter">籍&nbsp;&nbsp;&nbsp;&nbsp;贯</td>
  33. <td>浙江省余杭区</td>
  34. <td class="tcenter">出生年月</td>
  35. <td>2021年11月</td>
  36. </tr>
  37. <tr>
  38. <td class="tcenter">毕业院校</td>
  39. <td colspan="3">我的大学不告诉你</td>
  40. </tr>
  41. <tr>
  42. <td class="tcenter">主修专业</td>
  43. <td colspan="3">汉语言文学</td>
  44. </tr>
  45. <tr>
  46. <td class="tcenter">工程经验</td>
  47. <td>35年</td>
  48. <td class="tcenter">目前年薪</td>
  49. <td>26万</td>
  50. </tr>
  51. <tr>
  52. <td class="tcenter">有效证件</td>
  53. <td>台胞证</td>
  54. <td class="tcenter">证件号码</td>
  55. <td>52052088888888</td>
  56. </tr>
  57. <tr class="blue">
  58. <td colspan="5"></td>
  59. </tr>
  60. <tr class="title">
  61. <td colspan="5">------求职意向------</td>
  62. </tr>
  63. <tr class="blue">
  64. <td class="tcenter">寻求职位</td>
  65. <td colspan="4">全栈工程师</td>
  66. </tr>
  67. <tr>
  68. <td class="tcenter">求职地区</td>
  69. <td colspan="2">浙江杭州</td>
  70. <td class="tcenter">工资待遇</td>
  71. <td>50k</td>
  72. </tr>
  73. <tr>
  74. <td class="tcenter">自我评价</td>
  75. <td colspan="4">我工作其中,我对社会的了解.人与人之间的沟通是很重要的.做事情需要自己一个人独立去完成也是很重要的事情!掌握php及前端知识。我工作其中,我对社会的了解.人与人之间的沟通是很重要的.做事情需要自己一个人独立去完成也是很重要的事情!掌握php及前端知识</td>
  76. </tr>
  77. <tr class="blue">
  78. <td colspan="5"></td>
  79. </tr>
  80. <tr class="title">
  81. <td colspan="5">------教育培训------</td>
  82. </tr>
  83. <tr>
  84. <td class="tcenter" >起止时间</td>
  85. <td colspan="2">就读学校</td>
  86. <td class="tcenter">专业</td>
  87. <td>学历</td>
  88. </tr>
  89. <tr>
  90. <td class="tcenter">2010-2014</td>
  91. <td colspan="2">不知名大学</td>
  92. <td class="tcenter">汉语言文学</td>
  93. <td>大学</td>
  94. </tr>
  95. <tr class="blue">
  96. <td colspan="5"></td>
  97. </tr>
  98. <tr class="title">
  99. <td colspan="5">------工作经验------</td>
  100. </tr>
  101. <tr>
  102. <td class="tcenter" >就职公司</td>
  103. <td colspan="2">php中文网</td>
  104. <td class="tcenter">公司行业</td>
  105. <td>IT</td>
  106. </tr>
  107. <tr>
  108. <td class="tcenter">工作时间</td>
  109. <td colspan="2">2020-至今</td>
  110. <td class="tcenter">部门</td>
  111. <td>前端事业部</td>
  112. </tr>
  113. <tr>
  114. <td class="tcenter">公司性质</td>
  115. <td colspan="2">上市公司</td>
  116. <td class="tcenter">职位</td>
  117. <td>CTO</td>
  118. </tr>
  119. <tr class="blue">
  120. <td colspan="5"></td>
  121. </tr>
  122. <tr class="title">
  123. <td colspan="5">------联系方式------</td>
  124. </tr>
  125. <tr>
  126. <td class="tcenter">联系电话</td>
  127. <td colspan="4">0571-88888888</td>
  128. </tr>
  129. <tr>
  130. <td class="tcenter">手机</td>
  131. <td colspan="4">18042469376</td>
  132. </tr>
  133. <tr>
  134. <td class="tcenter">电子邮件</td>
  135. <td colspan="4">php********@163.com</td></td>
  136. </tr>
  137. </table>
  138. </body>
  139. </html>
css代码
  1. table{
  2. width:600px;
  3. border:1px solid #80817C;
  4. border-spacing:1px;
  5. border-collapse: collapse;
  6. margin:0 auto;
  7. font-size:12px;
  8. font-family:'Courier New', Courier, monospace;
  9. }
  10. table tr{
  11. height:20px;
  12. line-height:20px;
  13. border:1px solid #80817C;
  14. }
  15. table td{
  16. padding-left: 2px;
  17. border:1px solid #80817C;
  18. border-spacing:0px;
  19. padding-left: 10px;
  20. width:148px;
  21. }
  22. .blue{
  23. background-color:#A6C6EC;
  24. }
  25. .title{
  26. background-color:#E6EEFF;
  27. }
  28. .tcenter{text-align: center;}

注册表单

执行效果图

html代码
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>用户注册</title>
  7. <link rel="stylesheet" href="css/index.css">
  8. </head>
  9. <body>
  10. <table>
  11. <form type="post" action="">
  12. <tr>
  13. <th colspan="2">用户注册</th>
  14. </tr>
  15. <tr>
  16. <td class="label">账号:</td>
  17. <td>
  18. <input type="text" class="text" id="username" placeholder="请输入用户名,6-8个字符" />
  19. </td>
  20. </tr>
  21. <tr>
  22. <td class="label">密码:</td>
  23. <td><input class="text" type="password" value="" /></td>
  24. </tr>
  25. <tr>
  26. <td class="label">邮箱:</td>
  27. <td><input class="text" type="email" value="" placeholder="wwww@111.com" /></td>
  28. </tr>
  29. <tr>
  30. <td class="label">年龄:</td>
  31. <td>
  32. <input class="text" type="number" value="" placeholder="真实年龄" />
  33. </td>
  34. </tr>
  35. <tr>
  36. <td class="label">生日:</td>
  37. <td>
  38. <input type="date" class="text" value="" placeholder="年/月/日" />
  39. </td>
  40. </tr>
  41. <tr>
  42. <td class="label">课程:</td>
  43. <td>
  44. <select id="kc">
  45. <option>------请选择课程------</option>
  46. <option>计算机</option>
  47. <option>语种</option>
  48. </select>
  49. </td>
  50. </tr>
  51. <tr>
  52. <td class="label">性别</td>
  53. <td><input type="radio" /><input type="radio" /></td>
  54. </tr>
  55. <tr>
  56. <td class="label">简介:</td>
  57. <td><textarea name="" id="" cols="30" rows="10" placeholder="200个字以内"></textarea></td>
  58. </tr>
  59. <tr>
  60. <td class="label"><input type="submit" value="提交" /></td>
  61. <td><input type="button" value="AJAX" /></td>
  62. </tr>
  63. </form>
  64. </table>
  65. </body>
  66. </html>
css代码
  1. th{
  2. text-align: left;
  3. font-size:16px;
  4. }
  5. table{
  6. width:400px;
  7. margin:0 auto;
  8. padding:0;
  9. }
  10. .label{
  11. width:50px;
  12. font-size:14px;
  13. padding:0;
  14. margin:0;
  15. vertical-align:bottom
  16. }
  17. td{
  18. width:350px;
  19. text-align: left;
  20. padding:0;margin:0;
  21. height:35px;
  22. vertical-align:bottom
  23. }
  24. .text{
  25. width:200px;
  26. height:25px;
  27. line-height:25px;
  28. }
  29. textarea{
  30. width:200px;
  31. }
  32. select{
  33. height:25px;
  34. width:210px;
  35. line-height:25px;
  36. }
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
1 comments
织网虾 2021-11-11 20:03:27
好吧,那是正文中的好不好
1 floor
Author's latest blog post