亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

搜索
博主信息
博文 26
粉絲 2
評論 0
訪問量 30350
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板
表格實(shí)現(xiàn)購物車及表單實(shí)現(xiàn)
leverWang
原創(chuàng)
1634人瀏覽過

購物車

效果圖

  1. <html lang="en">
  2. <head>
  3. <meta charset="UTF-8">
  4. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  5. <title>Document</title>
  6. <style>
  7. table {
  8. text-align: center;
  9. width: 50%;
  10. margin: 0 auto;
  11. border-collapse: collapse;
  12. }
  13. table>caption {
  14. margin-bottom: 20px;
  15. font-size: 1.5rem;
  16. }
  17. th,
  18. td {
  19. border-bottom: 1px solid rgb(99, 99, 99);
  20. padding: 10px 0;
  21. color: #4e4e4e;
  22. font-weight: lighter;
  23. }
  24. tbody>tr:nth-last-of-type(2n) {
  25. background: rgba(194, 194, 194, .2);
  26. }
  27. tbody>tr:hover {
  28. background: lightpink;
  29. }
  30. table>thead {
  31. background: rgba(0, 129, 168, .1);
  32. }
  33. </style>
  34. </head>
  35. <body>
  36. <table>
  37. <caption>清單</caption>
  38. <thead>
  39. <tr>
  40. <th>ID</th>
  41. <th>商品名稱</th>
  42. <th>數(shù)量</th>
  43. <th>價(jià)格</th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <tr>
  48. <td>1</td>
  49. <td>羅技(Logitech)M185</td>
  50. <td>1</td>
  51. <td>59</td>
  52. </tr>
  53. <tr>
  54. <td>2</td>
  55. <td>羅技(Logitech)MK275</td>
  56. <td>1</td>
  57. <td>100</td>
  58. </tr>
  59. <tr>
  60. <td>3</td>
  61. <td>技嘉(GIGABYTE)RTX2070</td>
  62. <td>1</td>
  63. <td>6600</td>
  64. </tr>
  65. <tr>
  66. <td>4</td>
  67. <td>戴爾(DELL)U2720QM</td>
  68. <td>1</td>
  69. <td>4200</td>
  70. </tr>
  71. <tr>
  72. <td>5</td>
  73. <td>英特爾(Intel)i9-10900K</td>
  74. <td>1</td>
  75. <td>4499</td>
  76. </tr>
  77. </tbody>
  78. <tfoot>
  79. <tr>
  80. <td colspan="2">總計(jì):</td>
  81. <td>5</td>
  82. <td>15517</td>
  83. </tr>
  84. </tfoot>
  85. </table>
  86. </body>
  87. </html>

表單實(shí)現(xiàn)

效果圖

  1. <html lang="en">
  2. <head>
  3. <meta charset="UTF-8">
  4. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  5. <title>Document</title>
  6. <style>
  7. * {
  8. padding: 0;
  9. margin: 0;
  10. }
  11. .reg {
  12. width: 30%;
  13. margin: 0 auto;
  14. background: #e6e6e6;
  15. border-radius: 10px;
  16. margin-top: 30px;
  17. }
  18. h1 {
  19. font: 1.2rem;
  20. padding: 10px;
  21. display: block;
  22. text-align: center;
  23. color: #FFF;
  24. background: #008079;
  25. border-radius: 5px 5px 0px 0px;
  26. border-bottom: 1px solid #89AF4C;
  27. margin-bottom: 20px;
  28. }
  29. input,
  30. button {
  31. outline: none;
  32. }
  33. textarea {
  34. width: 100%;
  35. border: 1px solid #e6e6e6;
  36. margin-bottom: 15px;
  37. border-radius: 5px;
  38. padding-left: 10px;
  39. margin-top: 10px;
  40. padding-top: 15px;
  41. }
  42. input[type="search"],
  43. input[type="email"],
  44. input[type="text"] {
  45. width: 80%;
  46. height: 40px;
  47. line-height: 40px;
  48. border: 1px solid #e6e6e6;
  49. margin-bottom: 15px;
  50. border-radius: 5px;
  51. padding-left: 10px;
  52. }
  53. textarea:focus,
  54. input[type="search"]:focus,
  55. input[type='email']:focus,
  56. input[type='text']:focus {
  57. border-color: #66afe9;
  58. outline: 0;
  59. box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6)
  60. }
  61. .reg-form {
  62. padding: 20px;
  63. }
  64. label>span {
  65. display: inline-block;
  66. width: 84px;
  67. }
  68. .radio_type {
  69. width: 20px;
  70. height: 20px;
  71. appearance: none;
  72. position: relative;
  73. }
  74. .radio_type:before {
  75. content: '';
  76. width: 20px;
  77. height: 20px;
  78. display: inline-block;
  79. border-radius: 50%;
  80. }
  81. .radio_type:checked:before {
  82. content: '';
  83. width: 20px;
  84. height: 20px;
  85. border: 1px solid #008079;
  86. background: #008079;
  87. display: inline-block;
  88. border-radius: 50%;
  89. vertical-align: middle;
  90. }
  91. .radio_type:checked:after {
  92. content: '';
  93. width: 10px;
  94. height: 5px;
  95. border: 2px solid white;
  96. border-top: transparent;
  97. border-right: transparent;
  98. text-align: center;
  99. display: block;
  100. position: absolute;
  101. top: 6px;
  102. left: 5px;
  103. vertical-align: middle;
  104. transform: rotate(-45deg);
  105. }
  106. .radio_type:checked+label {
  107. color: #008079;
  108. }
  109. .radio_type+label {
  110. line-height: 20px;
  111. display: inline-block;
  112. margin-left: 5px;
  113. margin-right: 15px;
  114. color: #333;
  115. }
  116. .mb15 {
  117. margin-bottom: 15px;
  118. }
  119. input[type="checkbox"] {
  120. width: 20px;
  121. height: 20px;
  122. }
  123. button,
  124. input[type="submit"],
  125. input[type="reset"] {
  126. padding: 15px 30px;
  127. border: none;
  128. background: #008079;
  129. color: #fff;
  130. border-radius: 5px;
  131. margin-left: 15px;
  132. }
  133. .btn {
  134. text-align: center;
  135. }
  136. </style>
  137. </head>
  138. <body>
  139. <div class="reg">
  140. <h1>注冊</h1>
  141. <form action="" method="post" class="reg-form">
  142. <label for="uname">
  143. <span> 賬號:</span> <input type="text" id="uname" name="uname" placeholder="5-10位中文或字母" required>
  144. </label>
  145. <label for="pwd">
  146. <span> 密碼:</span> <input type="text" id="pwd" name="pwd" placeholder="6-20位字母+數(shù)字" required>
  147. </label>
  148. <label for="repwd">
  149. <span> 確認(rèn)密碼:</span> <input type="text" id="repwd" name="repwd" placeholder="確認(rèn)密碼" required>
  150. </label>
  151. <label for="email">
  152. <span> 郵箱:</span> <input type="email" id="email" name="email" placeholder="example@example.com" required>
  153. </label>
  154. <div class="mb15">
  155. <label for="male"> <span>性別:</span></label>
  156. <input class="radio_type" type="radio" name="gender" value="1" id="male"> <label for="male"></label>
  157. <input class="radio_type" type="radio" name="gender" value="2" id="female"><label for="female "></label>
  158. </div>
  159. <div class="mb15">
  160. <label for="other"><span>愛好:</span></label>
  161. <input type="checkbox" name="checkboox[]" id="basketball" value="basketball"> <label for="basketball">籃球</label>
  162. <input type="checkbox" name="checkboox[]" id="shoot" value="shoot"> <label for="shoot">攝影</label>
  163. <input type="checkbox" name="checkboox[]" id="other" value="other"> <label for="other">其他</label>
  164. </div>
  165. <div class="mb15">
  166. <label for="brand"><span>手機(jī)品牌:</span> </label>
  167. <input type="search" list="phone" name="brand" id="brand">
  168. <datalist id="phone">
  169. <option value="apple">
  170. <option value="huawei">
  171. <option value="mi">
  172. </datalist>
  173. </div>
  174. <div class="mb15">
  175. <label for="upload"><span>頭像上傳:</span> </label>
  176. <input type="file" name="upload" id="upload" accept="image/png, image/jpeg, image/gif">
  177. </div>
  178. <div class="mb15">
  179. <p>
  180. <label for="birthday"><span>生日:</span></label>
  181. <input type="date" id="birthday" name="birthday">
  182. </p>
  183. </div>
  184. <div class="mb15">
  185. <label for="birthday"><span>簡歷:</span></label>
  186. <textarea name="resume" id="resume" cols="50" rows="10" placeholder="不超過100字"></textarea>
  187. </div>
  188. <div class="btn">
  189. <button>提交</button>
  190. <input type="submit" value="注冊" name="submit">
  191. <input type="reset" value="重填" name="reset">
  192. </div>
  193. </form>
  194. </div>
  195. </body>
  196. </html>
批改老師:WJWJ

批改狀態(tài):合格

老師批語:用課堂上學(xué)到的知識寫了不一樣的表單,很漂亮!
本博文版權(quán)歸博主所有,轉(zhuǎn)載請注明地址!如有侵權(quán)、違法,請聯(lián)系admin@php.cn舉報(bào)處理!
全部評論 文明上網(wǎng)理性發(fā)言,請遵守新聞評論服務(wù)協(xié)議
0條評論
關(guān)于我們 免責(zé)申明 意見反饋 講師合作 廣告合作 最新更新
php中文網(wǎng):公益在線php培訓(xùn),幫助PHP學(xué)習(xí)者快速成長!
關(guān)注服務(wù)號 技術(shù)交流群
PHP中文網(wǎng)訂閱號
每天精選資源文章推送
PHP中文網(wǎng)APP
隨時(shí)隨地碎片化學(xué)習(xí)
PHP中文網(wǎng)抖音號
發(fā)現(xiàn)有趣的

Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號

  • 登錄PHP中文網(wǎng),和優(yōu)秀的人一起學(xué)習(xí)!
    全站2000+教程免費(fèi)學(xué)