contact-form.scss 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. .form {
  2. .form-item {
  3. display: flex;
  4. justify-content: space-between;
  5. margin-bottom: 25px;
  6. .form-label {
  7. font-size: 16px;
  8. color: #999;
  9. line-height: 40px;
  10. min-width: 100px;
  11. text-align: right;
  12. margin-right: 16px;
  13. em {
  14. color: #ff0000;
  15. margin-right: 4px;
  16. }
  17. }
  18. .form-control {
  19. flex: 1;
  20. color: #505050;
  21. font-size: 16px;
  22. &.input {
  23. input {
  24. display: block;
  25. width: 100%;
  26. line-height: 40px;
  27. border: 1px solid #dedede;
  28. box-sizing: border-box;
  29. padding: 0 16px;
  30. border-radius: 4px;
  31. }
  32. }
  33. &.textarea {
  34. textarea {
  35. display: block;
  36. width: 100%;
  37. line-height: 26px;
  38. border: 1px solid #dedede;
  39. box-sizing: border-box;
  40. padding: 8px 16px;
  41. border-radius: 2px;
  42. resize: none;
  43. }
  44. }
  45. &.select-group {
  46. display: flex;
  47. justify-content: space-between;
  48. .select {
  49. width: 100%;
  50. flex: 1;
  51. position: relative;
  52. margin-right: 16px;
  53. border: 1px solid #e8e8e8;
  54. border-radius: 2px;
  55. &:last-child {
  56. margin-right: 0;
  57. }
  58. select {
  59. display: block;
  60. width: 100%;
  61. border: 0;
  62. line-height: 40px;
  63. padding: 0 16px;
  64. padding-right: 40px;
  65. color: #272727;
  66. appearance: none;
  67. border-radius: 2px;
  68. }
  69. &::after {
  70. position: absolute;
  71. right: 0;
  72. top: 0;
  73. content: '';
  74. z-index: 1;
  75. display: block;
  76. width: 40px;
  77. height: 40px;
  78. background: url(/img/icon-arrow-down.png) no-repeat center;
  79. background-size: 24px 24px;
  80. pointer-events: none;
  81. }
  82. }
  83. }
  84. &.radio {
  85. line-height: 40px;
  86. label {
  87. margin-right: 35px;
  88. }
  89. input {
  90. margin-right: 10px;
  91. }
  92. }
  93. &.upload-image {
  94. input {
  95. display: none;
  96. }
  97. .tip {
  98. width: 120px;
  99. height: 120px;
  100. border: 1px solid #dedede;
  101. margin-top: 10px;
  102. box-sizing: border-box;
  103. padding-top: 80px;
  104. text-align: center;
  105. font-size: 14px;
  106. color: #999;
  107. cursor: pointer;
  108. position: relative;
  109. &::before,
  110. &::after {
  111. content: '';
  112. display: block;
  113. position: absolute;
  114. background: #dedede;
  115. width: 2px;
  116. height: 30px;
  117. left: 50%;
  118. top: 50%;
  119. }
  120. &::before {
  121. transform: translateX(-50%) translateY(-80%);
  122. }
  123. &::after {
  124. transform: translateX(-50%) translateY(-80%) rotateZ(90deg);
  125. }
  126. }
  127. }
  128. &.upload-file {
  129. [type='file'] {
  130. display: none;
  131. }
  132. .button {
  133. line-height: 40px;
  134. width: 207px;
  135. background: #0688d2;
  136. color: #fff;
  137. text-align: center;
  138. margin-left: 16px;
  139. cursor: pointer;
  140. transition: all 0.4s;
  141. &:hover {
  142. background: #077ec4;
  143. }
  144. }
  145. }
  146. }
  147. }
  148. .form-submit {
  149. text-align: center;
  150. margin-top: 80px;
  151. button {
  152. width: 330px;
  153. height: 48px;
  154. background: transparent;
  155. box-sizing: border-box;
  156. border: 0;
  157. cursor: pointer;
  158. margin: 0 24px;
  159. transition: all 0.4s;
  160. }
  161. [type='reset'] {
  162. border: 1px solid #0688d2;
  163. color: #0688d2;
  164. line-height: 46px;
  165. &:hover {
  166. border-color: #0679b8;
  167. color: #0679b8;
  168. }
  169. }
  170. [type='submit'] {
  171. background: #0688d2;
  172. color: #fff;
  173. line-height: 48px;
  174. &:hover {
  175. background: #077ec4;
  176. }
  177. }
  178. }
  179. }