contact-form.scss 4.8 KB

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