Blogger Information
Blog 119
fans 3
comment 1
visits 94578
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
表格个人简历、背景图定位属性、列表雪碧图、导航条实例代码
赵大叔
Original
881 people have browsed it

1、表格个人简历

  • 主要知识:表格跨行、跨列、单元格选择
  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. <style>
  9. /* 主要知识:表格跨行、跨列; */
  10. tr{
  11. height: 38px;
  12. }
  13. td:nth-of-type(4){
  14. width:146px;
  15. }
  16. thead tr:first-of-type {
  17. background-color: rgb(164, 197, 237);
  18. }
  19. td[colspan="5"] {
  20. background-color: rgb(202, 216, 248);
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <table border="1" cellspacing="0" width="780" Cellpadding="5" style="margin: auto;">
  26. <thead>
  27. <tr>
  28. <th colspan="5">--------个人简历--------</th>
  29. <!-- <th>111</th>
  30. <th>111</th>
  31. <th>111</th>
  32. <th>111</th> -->
  33. </tr>
  34. </thead>
  35. <tbody>
  36. <tr>
  37. <td colspan="5">--------基本资料--------</td>
  38. <!-- <td>1</td>
  39. <td>1</td>
  40. <td>1</td>
  41. <td>1</td> -->
  42. </tr>
  43. <tr>
  44. <td>姓名</td>
  45. <td></td>
  46. <td>性别</td>
  47. <td></td>
  48. <td rowspan="5" width="138px"></td>
  49. </tr>
  50. <tr>
  51. <td>学历</td>
  52. <td></td>
  53. <td>身高</td>
  54. <td></td>
  55. <!-- <td>1</td> -->
  56. </tr>
  57. <tr>
  58. <td>籍贯</td>
  59. <td></td>
  60. <td>出生年月</td>
  61. <td></td>
  62. <!-- <td>1</td> -->
  63. </tr>
  64. <tr>
  65. <td>毕业院校</td>
  66. <td colspan="3"></td>
  67. <!-- <td></td>
  68. <td></td>
  69. <td></td> -->
  70. </tr>
  71. <tr>
  72. <td>主修专业</td>
  73. <td colspan="3"></td>
  74. <!-- <td></td>
  75. <td></td>
  76. <td></td> -->
  77. </tr>
  78. <tr>
  79. <td>工作经验</td>
  80. <td></td>
  81. <td>目前年薪</td>
  82. <td colspan="2"></td>
  83. <!-- <td></td> -->
  84. </tr>
  85. <tr>
  86. <td>有效证件</td>
  87. <td></td>
  88. <td>证件号码</td>
  89. <td colspan="2"></td>
  90. <!-- <td></td> -->
  91. </tr>
  92. <tr>
  93. <td colspan="5"></td>
  94. <!-- <td></td> -->
  95. </tr>
  96. <tr>
  97. <td colspan="5">--------求职意向--------</td>
  98. <!-- <td></td>
  99. <td></td>
  100. <td></td>
  101. <td></td> -->
  102. </tr>
  103. <tr>
  104. <td>寻求职位</td>
  105. <td colspan="4"></td>
  106. <!-- <td></td>
  107. <td></td>
  108. <td></td> -->
  109. </tr>
  110. <tr>
  111. <td>求职地区</td>
  112. <td></td>
  113. <td>工资待遇</td>
  114. <td colspan="2"></td>
  115. <!-- <td></td> -->
  116. </tr>
  117. <tr>
  118. <td>自我评价</td>
  119. <td colspan="4"></td>
  120. <!-- <td></td>
  121. <td></td>
  122. <td></td> -->
  123. </tr>
  124. <tr>
  125. <td colspan="5"></td>
  126. <!-- <td></td> -->
  127. </tr>
  128. <tr>
  129. <td colspan="5">--------教育培训--------</td>
  130. <!-- <td></td>
  131. <td></td>
  132. <td></td>
  133. <td></td> -->
  134. </tr>
  135. <tr>
  136. <td>起止时间</td>
  137. <td>学校名称</td>
  138. <td>主修专业</td>
  139. <td colspan="2">学历</td>
  140. <!-- <td></td> -->
  141. </tr>
  142. <tr>
  143. <td></td>
  144. <td></td>
  145. <td></td>
  146. <td colspan="2"></td>
  147. <!-- <td></td> -->
  148. </tr>
  149. <tr>
  150. <td colspan="5"></td>
  151. <!-- <td></td> -->
  152. </tr>
  153. <tr>
  154. <td colspan="5">--------工作经历--------</td>
  155. <!-- <td></td>
  156. <td></td>
  157. <td></td>
  158. <td></td> -->
  159. </tr>
  160. <tr>
  161. <td>就职公司</td>
  162. <td></td>
  163. <td>公司行业</td>
  164. <td colspan="2"></td>
  165. <!-- <td></td> -->
  166. </tr>
  167. <tr>
  168. <td>就职时间</td>
  169. <td></td>
  170. <td>就职部门</td>
  171. <td colspan="2"></td>
  172. <!-- <td></td> -->
  173. </tr>
  174. <tr>
  175. <td>公司性质</td>
  176. <td></td>
  177. <td>就职职位</td>
  178. <td colspan="2"></td>
  179. <!-- <td></td> -->
  180. </tr>
  181. <tr>
  182. <td>工作描述</td>
  183. <td colspan="4"></td>
  184. <!-- <td></td>
  185. <td></td>
  186. <td></td> -->
  187. </tr>
  188. <tr>
  189. <td colspan="5"></td>
  190. <!-- <td></td> -->
  191. </tr>
  192. <tr>
  193. <td colspan="5">-------- 联系方式 --------</td>
  194. <!-- <td></td>
  195. <td></td>
  196. <td></td>
  197. <td></td> -->
  198. </tr>
  199. <tr>
  200. <td>联系电话</td>
  201. <td colspan="4"></td>
  202. <!-- <td></td>
  203. <td></td>
  204. <td></td> -->
  205. </tr>
  206. <tr>
  207. <td>联系手机</td>
  208. <td colspan="4"></td>
  209. <!-- <td></td>
  210. <td></td>
  211. <td></td> -->
  212. </tr>
  213. <tr>
  214. <td>电子邮件</td>
  215. <td colspan="4"></td>
  216. <!-- <td></td>
  217. <td></td>
  218. <td></td> -->
  219. </tr>
  220. </tbody>
  221. </table>
  222. </body>
  223. </html>

2、背景图定位属性

  • 背景图片定位
  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. <style>
  9. /* 背景图片定位 */
  10. .content {
  11. position: relative;
  12. }
  13. .item {
  14. width: 128px;
  15. height: 128px;
  16. /* border:1px solid red; */
  17. background-image: url(img1.jpg);
  18. background-repeat: no-repeat;
  19. background-size: 1255px 152px;
  20. }
  21. .item1 {
  22. background-position: -13px ;
  23. }
  24. .item2 {
  25. position: absolute;
  26. top: 0;
  27. left: 128px;
  28. background-position: -151px;
  29. }
  30. .item3 {
  31. position: absolute;
  32. top: 0;
  33. left: 256px;
  34. background-position: -289px;
  35. }
  36. .item4 {
  37. position: absolute;
  38. top: 128px;
  39. left: 0;
  40. background-position: -426.5px;
  41. }
  42. .item5 {
  43. position: absolute;
  44. top: 128px;
  45. left: 128px;
  46. background-position: -565px;
  47. }
  48. .item6 {
  49. position: absolute;
  50. top: 128px;
  51. left: 256px;
  52. background-position: -703px;
  53. }
  54. .item7 {
  55. background-image: url(img1.jpg);
  56. position: absolute;
  57. top:256px;
  58. left:0;
  59. background-position: -840.5px;
  60. }
  61. .item8 {
  62. position: absolute;
  63. top:256px;
  64. left:128px;
  65. background-position: -978px;
  66. }
  67. .item9 {
  68. position: absolute;
  69. top:256px;
  70. left:256px;
  71. background-position: -1117px;
  72. }
  73. </style>
  74. </head>
  75. <body>
  76. <div class="content">
  77. <div class="item item1"></div>
  78. <div class="item item2"></div>
  79. <div class="item item3"></div>
  80. <div class="item item4"></div>
  81. <div class="item item5"></div>
  82. <div class="item item6"></div>
  83. <div class="item item7"></div>
  84. <div class="item item8"></div>
  85. <div class="item item9"></div>
  86. </div>
  87. </body>
  88. </html>

3、列表雪碧图

  • 背景图片定位、元素边框设置
  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. <style>
  9. /* 背景图片、元素边框 */
  10. .content{
  11. width: 460px;
  12. color: rgb(211, 55, 153);
  13. }
  14. h3{
  15. margin-left: 200px;
  16. }
  17. li:first-of-type{
  18. border-top:2px solid #000;
  19. }
  20. li{
  21. padding-left: 24px;
  22. background-image: url(../lesson04/作业/作业用到的图片/aaaa.png);
  23. background-repeat: no-repeat;
  24. background-position: 0 10px;
  25. border-bottom:1px solid rgb(117, 116, 116);
  26. height: 38px;
  27. line-height: 38px;
  28. list-style:none;
  29. }
  30. </style>
  31. </head>
  32. <body>
  33. <div class="content">
  34. <h3>学习猿地</h3>
  35. <ul>
  36. <li> 老师都是大型互联网公司的总监及以上职位,名校毕业,老司机</li>
  37. <li> 课程是最全的有这一套精品,不需要再找任何其他学习资料弥补</li>
  38. <li> 集中精力在这这一套全栈课程中做好每一节课不断迭代打造精品</li>
  39. <li> 课程以项目贯穿是讲解需要的技术知其然知其所以然</li>
  40. <li> 课程是专为零基础到精通的目标设计有基础的可选择内容学习</li>
  41. <li> 学习系统模拟面试的过程通关是学习效果却超过面授几倍</li>
  42. <li> 服务好有大牛知道有同学之间互动有全面的资料下载</li>
  43. <li> 最好的课程价格却是行业最低的第几位甚至几十倍</li>
  44. </ul>
  45. </div>
  46. </body>
  47. </html>

4、导航条

  • 定位属性
  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. <style>
  9. /* 1、将ul容器做相对定位,使li标签在容器内定位;
  10. 2、把每一个li做绝对定位;
  11. 3、给li设置:hover属性。 */
  12. ul {
  13. height: 48px;
  14. width: 880px;
  15. line-height: 48px;
  16. background-color: red;
  17. position: relative;
  18. }
  19. li{
  20. list-style:none;
  21. /* background-color: red; */
  22. /* margin: auto; */
  23. /* width: 200px; */
  24. }
  25. li:hover{
  26. background-color: #fff;
  27. color: rgb(249, 6, 6);
  28. }
  29. ul li:first-of-type{
  30. position: absolute;
  31. left: calc(2* 48px);
  32. }
  33. ul li:nth-of-type(2){
  34. position: absolute;
  35. left: calc(3* 48px);
  36. }
  37. ul li:nth-of-type(3){
  38. position: absolute;
  39. left: calc(4* 48px);
  40. }
  41. ul li:nth-of-type(4){
  42. position: absolute;
  43. left: calc(5* 48px);
  44. }
  45. ul li:nth-of-type(5){
  46. position: absolute;
  47. left: calc(6* 48px);
  48. }
  49. ul li:nth-of-type(6){
  50. position: absolute;
  51. left: calc(7* 68px);
  52. }
  53. ul li:nth-of-type(7){
  54. position: absolute;
  55. left: calc(8* 48px);
  56. }
  57. </style>
  58. </head>
  59. <body>
  60. <ul>
  61. <li> 首页</li>
  62. <li> 前言</li>
  63. <li> 前端</li>
  64. <li> 后端</li>
  65. <li> 云计算</li>
  66. <li> 产品设计</li>
  67. <li> 关于我们</li>
  68. </ul>
  69. </body>
  70. </html>

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
0 comments
Author's latest blog post