index.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <style type="text/css">
  2. body {
  3. background-image: linear-gradient( rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) ),url(https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F03799d65aac74f7a80121246d63d56e.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1624787496&t=c1bdff990bebe93bcafa07d2a1a09fcc);
  4. background-position: center top;
  5. background-size: 100% auto;
  6. color:white;
  7. font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  8. }
  9. #title-div {
  10. width: 800px;
  11. margin: auto;
  12. text-align: center;
  13. }
  14. #form-div {
  15. background-color: hsla(209, 94%, 21%, 0.8);
  16. width: 800px;
  17. margin: 40px auto 40px auto;
  18. padding-top: 40px;
  19. border-radius: 4px;
  20. }
  21. form {
  22. width: 90%;
  23. margin: auto;
  24. }
  25. textarea {
  26. width: 100%;
  27. height: 200px;
  28. }
  29. .input-text {
  30. width: 100%;
  31. height: 32px;
  32. margin: 2px 0 10px 0 ;
  33. border-radius: 2px;
  34. font-size: 18px;
  35. }
  36. .input-radio {
  37. font-size: 18px;
  38. margin-top: 10px;
  39. }
  40. .input-label {
  41. font-size: 20px;
  42. }
  43. .div-margin {
  44. margin-bottom: 20px;
  45. }
  46. button {
  47. background-color: rgb(71, 133, 71);
  48. color: aliceblue;
  49. height: 40px;
  50. width: 90%;
  51. border-radius: 2px;
  52. font-size: 24px;
  53. outline: none;
  54. border:none;
  55. margin: 5% 20px 5% 20px;
  56. }
  57. @media (max-width:900px) {
  58. #title-div {
  59. width: 98%;
  60. margin: auto;
  61. text-align: center;
  62. }
  63. #form-div {
  64. background-color: hsla(276, 31%, 20%, 0.8);
  65. width: 98%;
  66. margin: 40px auto 40px auto;
  67. padding-top: 40px;
  68. border-radius: 4px;
  69. }
  70. }
  71. </style>
  72. <main>
  73. <div id="title-div">
  74. <h1 id="title">freeCodeCamp Survey Form</h1>
  75. <p id="description">Thank you for taking the time to help us improve the platform</p>
  76. </div>
  77. <div id="form-div">
  78. <form id="survey-form">
  79. <div class="div-margin">
  80. <label id="name-label" class="input-label" for="name">Name</label><br>
  81. <input id="name" class="input-text" type="text" placeholder="Enter your name" required><br>
  82. </div>
  83. <div class="div-margin">
  84. <label id="email-label" class="input-label" for="email">Email</label><br>
  85. <input id="email" class="input-text" type="email" placeholder="Enter your email" required><br>
  86. </div>
  87. <div class="div-margin">
  88. <label id="number-label" class="input-label" for="number">Age(option)</label><br>
  89. <input id="number" class="input-text" type="number" placeholder="10" min="10" max="100"><br>
  90. </div>
  91. <div class="div-margin">
  92. <label class="input-label" for="dropdown">Which option best describes your current role?</label><br>
  93. <select class="input-text" id="dropdown" >
  94. <optgroup label="can no choose"></optgroup>
  95. <option value="volvo">Volvo</option>
  96. <option value="saab">Saab</option>
  97. <option value="mercedes">Mercedes</option>
  98. <option value="audi">Audi</option>
  99. </select>
  100. </div>
  101. <div class="div-margin">
  102. <label class="input-label"> the radio choose here:</label><br>
  103. <label for="one-radio"><input class="input-radio" id="one-radio" value="one" type="radio" name="radio-select" > radio-choose-one</label><br>
  104. <label for="two-radio"><input class="input-radio" id="two-radio" value="two" type="radio" name="radio-select" > radio-choose-two</label><br>
  105. <label for="three-radio"><input class="input-radio" id="three-radio" value="three" type="radio" name="radio-select" > radio-choose-three</label><br>
  106. </div>
  107. <div class="div-margin">
  108. <label class="input-label"> the radio choose here:</label><br>
  109. <label for="one-checkbox"><input class="input-radio" id="one-checkbox" value="one1" type="checkbox" name="checkbox-select"> checkbox-choose-one</label><br>
  110. <label for="two-checkbox"><input class="input-radio" id="two-checkbox" value="two1" type="checkbox" name="checkbox-select"> checkbox-choose-two</label><br>
  111. <label for="three-checkbox"><input class="input-radio" id="three-checkbox" value="three1" type="checkbox" name="checkbox-select"> checkbox-choose-three</label><br>
  112. </div>
  113. <div class="div-margin">
  114. <label class="input-label">the checkbox choose here:</label><br>
  115. <textarea class="input-label" id="commonts" placeholder="Enter your commonts..."></textarea>
  116. </div>
  117. <button id="submit" type="submit">Submit</button>
  118. </form>
  119. </div>
  120. </main>