找回密碼
 立即註冊
查看: 1119|回復: 1

HTML5 : Forms

[複製鏈接]

934

主題

649

回帖

3萬

積分

管理員

論壇管理員

積分
39487

最佳新人活躍會員熱心會員推廣達人宣傳達人灌水之王突出貢獻優秀版主榮譽管理論壇元老

發表於 2022-8-16 16:46:41 | 顯示全部樓層 |閱讀模式
  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>Bootcamp Registration</title>
  8.   <link rel="preconnect" href="https://fonts.googleapis.com">
  9. <link rel="preconnect" href="https://fonts.googleapis.com">
  10. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  11. <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap" rel="stylesheet">
  12. </head>
  13. <body>
  14.   <div class="form">
  15.     <h1>Bootcamp Registration Form</h1>
  16.   <p>Complete this form to express your interest in the upcoming web development bootcamp.</p>
  17.   <form>
  18. <!-- Contact Details -->
  19.     <fieldset class="first-section">
  20.       <legend>Contact Details</legend>
  21.       <label for="name">Name</label>
  22.       <input autofocus type="text" id="name" name="name" autofocus placeholder="Ophy Boamah" autocomplete="on" required> <br><br>
  23.       <label for="email">Email</label>
  24.       <input type="email" id="email" placeholder="[email protected]"> <br><br>
  25.       <label for="tel">Phone</label>
  26.       <input type="tel" id="tel" placeholder="+233 200001212"> <br><br>
  27.     </fieldset>
  28.     <!-- Personal Information -->
  29.     <fieldset class="second-section">
  30.       <legend>Personal Information</legend>
  31.       <label for="dob">Birth Date</label>
  32.       <input type="date" id="dob"> <br><br>
  33.         <label for="gender">Gender ??</label>
  34.       <input list="genders" name="gender" id="gender">
  35.       <datalist id="genders">
  36.         <option value="female">
  37.         <option value="male">
  38.         <option value="other">
  39.       </datalist><br><br>
  40.      <div class="proficiency">
  41.         <label for="profeciency">Proficiency</label>
  42.       <input type="range" value="4" max="10" id="profeciency" name="profeciency">
  43.      </div>

  44.     </fieldset>
  45.      <!-- Preferred Language -->
  46.      <div class="terms">
  47.         <input type="checkbox" id="scales" name="scales" class="checkbox">
  48.       <label for="scales">I have read and agree to the terms and conditions</label>
  49.      </div>
  50.     <button>Submit</button>
  51.   </form>
  52.   </div>
  53. </body>
  54. </html>
複製代碼
HTML Code
[發帖際遇]: admin 發帖時在路邊撿到 4 金錢,偷偷放進了口袋. 幸運榜 / 衰神榜

934

主題

649

回帖

3萬

積分

管理員

論壇管理員

積分
39487

最佳新人活躍會員熱心會員推廣達人宣傳達人灌水之王突出貢獻優秀版主榮譽管理論壇元老

 樓主| 發表於 2022-8-16 16:47:33 | 顯示全部樓層
  1. * {
  2.   font-family: 'Montserrat', sans-serif;
  3. }

  4. body {
  5.   height: 80vh;
  6.   margin-top: 5rem;
  7.   background-image: url("https://images.unsplash.com/photo-1595675024853-0f3ec9098ac7?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Nnx8Y29kaW5nJTIwYm9vdGNhbXB8ZW58MHx8MHx8&auto=format&fit=crop&w=500&q=60");
  8.   background-repeat: no-repeat;
  9.   background-position: center;
  10.   background-size: cover;
  11.   padding: 10px;
  12. }

  13. .form {
  14.   background-color: #fff;
  15.   border-radius: 5px;
  16.   padding: 15px 25px;
  17.   width: 80%;
  18.   margin: 0 auto;
  19. }

  20. .checkbox {
  21.   width: 20px !important;
  22. }

  23. .first-section input {
  24.   width: 85%;
  25.   height: 25px;
  26.   margin-left: 5px;
  27. }

  28. .second-section input{
  29.   width: 80%;
  30.   height: 25px;
  31.   margin-left: 5px;
  32. }

  33. .form h1, p {
  34.   text-align: center;
  35. }
  36. button {
  37.   border: none;
  38.   color: white;
  39.   background: #1560BD;
  40.   padding: 8px 25px;
  41.   border-radius: 5px;
  42.   display: block;
  43.   margin: 20px auto 10px auto;
  44.   width: 120px;
  45. }

  46. .second-section {
  47.   margin-top: 15px;
  48. }

  49. .proficiency {
  50.   display: flex;
  51.   align-items: center;
  52. }

  53. .terms {
  54.   margin-top: 15px;
  55.   display: flex;
  56.   align-items: center;
  57. }
複製代碼
CSS Code
[發帖際遇]: 一個袋子砸在了 admin 頭上,admin 賺了 1 金錢. 幸運榜 / 衰神榜
您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

Archiver|手機版|小黑屋|DD論壇 維護: Redd Design

GMT+8, 2024-9-8 10:51 , Processed in 0.051439 second(s), 31 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回復 返回頂部 返回列表