login.scss 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. /* ===== PC DESIGN ===== */
  2. $W: 1000;
  3. $H: 1920;
  4. $picW: 438;
  5. $picH: 560;
  6. $formW: 320;
  7. $tabW: $formW / 2;
  8. $rowH: 56;
  9. $buttonH: 50;
  10. // container
  11. $containerBgColor: #e6ebf2;
  12. $containerBgImage: '../assets/images/bg.png';
  13. // container-logo
  14. $logoWidth: 417px;
  15. $logoHeight: 64px;
  16. $logoImage: '../assets/logo/login-logo.png';
  17. // container-content
  18. $contentWidth: round($W / $H * 100) * 1vw;
  19. $contentHeight: round($picH / $W * 100) / 100 * $contentWidth;
  20. $contentBgColor: #ffffff;
  21. // container-content-pic
  22. $picWidth: round($picW / $H * 100) * 1vw;
  23. $picHeight: inherit;
  24. $picImage: '../assets/images/pic.png';
  25. // container-content-field
  26. $fieldWidth: $contentWidth - $picWidth;
  27. $fieldHeight: inherit;
  28. // container-content-field-form
  29. $formWidth: $formW * 1px;
  30. $tabWidth: $tabW * 1px;
  31. $rowHeight: $rowH * 1px;
  32. $buttonHeight: $buttonH * 1px;
  33. // - - - - - 页面基础设置
  34. .container {
  35. .login-code {
  36. width: 33%;
  37. height: 38px;
  38. float: right;
  39. img {
  40. cursor: pointer;
  41. width:100%;max-width:100px; height:auto;
  42. vertical-align: middle;
  43. }
  44. }
  45. // 元素
  46. width: inherit;
  47. height: inherit;
  48. min-width: 1080px;
  49. min-height: 620px;
  50. background-color: $containerBgColor;
  51. background-image: url($containerBgImage);
  52. background-size: cover;
  53. // 定位
  54. position: relative;
  55. display: flex;
  56. justify-content: center;
  57. align-items: center;
  58. // 文字
  59. font-size: 14px;
  60. font-family: Microsoft YaHei;
  61. font-weight: 400;
  62. .logo {
  63. // 元素
  64. width: $logoWidth;
  65. height: $logoHeight;
  66. background-image: url($logoImage);
  67. background-size: contain;
  68. // 定位
  69. position: absolute;
  70. top: 50px;
  71. left: 50%;
  72. margin-left: -$logoWidth/2;
  73. }
  74. .content {
  75. // 元素
  76. width: $contentWidth;
  77. height: $contentHeight;
  78. background-color: #ffffff;
  79. box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07);
  80. border-radius: 20px;
  81. // 定位
  82. position: relative;
  83. .pic {
  84. // 元素
  85. width: $picWidth;
  86. height: $picHeight;
  87. background-image: url($picImage);
  88. background-repeat: no-repeat;
  89. background-size: cover;
  90. border-radius: 20px 0 0 20px;
  91. // 定位
  92. position: absolute;
  93. top: 0;
  94. left: 0;
  95. }
  96. .field {
  97. width: $fieldWidth;
  98. height: $fieldHeight;
  99. // 定位
  100. position: absolute;
  101. top: 0;
  102. left: $picWidth;
  103. display:flex;
  104. justify-content: center;
  105. align-items: center;
  106. .pc-title{ width: 100%; clear: both;}
  107. .mobile-title,
  108. .mobile-switch {
  109. display: none;
  110. }
  111. .form {
  112. box-sizing: border-box;
  113. width: $formWidth;
  114. // - - - tab
  115. :deep(.el-tabs__content) {
  116. padding: 20px 0 0;
  117. }
  118. :deep(.el-tabs__item) {
  119. // 元素
  120. width: $tabWidth;
  121. height: $rowHeight;
  122. padding: 0;
  123. // 文字
  124. line-height: $rowHeight;
  125. color: #666666;
  126. }
  127. :deep(.el-tabs__item.is-active) {
  128. font-weight: bold;
  129. color: #2F53EB;
  130. }
  131. :deep(.el-tabs__active-bar) {
  132. height: 3px;
  133. border-radius: 2px;
  134. }
  135. // - - - input
  136. :deep(.el-input__inner) {
  137. // 元素
  138. width: 100%;
  139. height: $rowHeight;
  140. background: #f5f5f5;
  141. border: 0;
  142. border-radius: 28px;
  143. // 文字
  144. text-align: center;
  145. line-height: 19px;
  146. color: #262626;
  147. }
  148. .code:deep(.el-input__inner) {
  149. padding: 0 24px;
  150. // 文字
  151. text-align: left;
  152. }
  153. :deep(.el-input__inner::-webkit-input-placeholder) { /* WebKit browsers */
  154. font-weight: 400;
  155. color: #8C8C8C;
  156. }
  157. :deep(.el-input__inner:-moz-placeholder) { /* Mozilla Firefox 4 to 18 */
  158. font-weight: 400;
  159. color: #8C8C8C;
  160. }
  161. :deep(.el-input__inner::-moz-placeholder) { /* Mozilla Firefox 19+ */
  162. font-weight: 400;
  163. color: #8C8C8C;
  164. opacity:1;
  165. }
  166. :deep(.el-input__inner:-ms-input-placeholder) { /* Internet Explorer 10+ */
  167. font-weight: 400;
  168. color: #8C8C8C !important;
  169. }
  170. :deep(.el-form-item) {
  171. position: relative;
  172. .button-code {
  173. // 元素
  174. height: $rowHeight;
  175. box-sizing: border-box;
  176. // 定位
  177. position: absolute;
  178. top: 0;
  179. right: 20px;
  180. z-index: 1;
  181. // 文字
  182. line-height: 20px;
  183. font-size: 14px;
  184. font-family: PingFang SC;
  185. font-weight: 400;
  186. color: #2F53EB;
  187. span {
  188. padding-left: 15px;
  189. border-left: 2px solid #D9D9D9;
  190. }
  191. }
  192. }
  193. :deep(.el-form-item__error) {
  194. padding-left: 24px;
  195. }
  196. .button {
  197. width: 100%;
  198. height: $buttonHeight;
  199. background: rgba(24, 144, 255, 0.2);
  200. border: 0;
  201. border-radius: 24px;
  202. margin-bottom: 20px;
  203. // 文字
  204. line-height: 26px;
  205. font-size: 20px;
  206. color: #FFFFFF;
  207. }
  208. .button-active {
  209. background: #2F53EB;
  210. box-shadow: 0px 2px 8px rgba(0, 80, 184, 0.2);
  211. }
  212. }
  213. }
  214. }
  215. .footer {
  216. // 元素
  217. height: 16px;
  218. line-height: 16px;
  219. font-size: 12px;
  220. color: #8c8c8c;
  221. // 定位
  222. position: absolute;
  223. bottom: 30px;
  224. a,
  225. a:hover,
  226. a:active {
  227. color: inherit;
  228. text-decoration: none;
  229. }
  230. }
  231. }
  232. // - - - - - PC 最小尺寸设置
  233. @media screen and (min-width: 599px) and (max-width: 1366px) {
  234. .container {
  235. .content {
  236. width: 710px;
  237. height: 397px;
  238. .pic {
  239. width: 314px;
  240. }
  241. .field {
  242. width: calc(710px - 314px);
  243. left: 314px;
  244. .form {
  245. width: 320px;
  246. :deep(.el-input__inner) {
  247. width: 320px;
  248. height: 56px;
  249. }
  250. .button {
  251. height: 50px;
  252. }
  253. }
  254. }
  255. }
  256. }
  257. }
  258. /* ===== MOBILE DESIGN ===== */
  259. $mobileW: 375;
  260. $mobileH: 812;
  261. $mobileContentW: 327;
  262. $mobileContentH: 376;
  263. $mobileFormW: 280;
  264. $mobileRowH: 48;
  265. $mobileButtonH: 48;
  266. // container
  267. $mobileContainerBgImage: '../assets/images/bg-mobile.png';
  268. // container-content
  269. $mobileContentWidth: round($mobileContentW / $mobileW * 100) * 1vw;
  270. $mobileContentHeight: round($mobileContentH / $mobileW * 100) / 100 * $mobileContentWidth;
  271. // container-content-field-form
  272. $mobileFormWidth: round($mobileFormW / $mobileW *100) * 1vw;
  273. $mobileRowHeight: $mobileRowH * 1px;
  274. $mobileButtonHeight: $mobileButtonH * 1px;
  275. $iconBgImage: '../assets/images/icon.png';
  276. // - - - - - 移动端设置
  277. @media screen and (max-width: 599px) {
  278. .container {
  279. // 元素
  280. background-image: url($mobileContainerBgImage);
  281. min-width: 280px;
  282. min-height: 568px;
  283. // 文字
  284. font-size: 17px;
  285. font-family: PingFang SC;
  286. font-weight: bold;
  287. .logo {
  288. display: none;
  289. }
  290. .content {
  291. // 元素
  292. width: $mobileContentWidth;
  293. height: $mobileContentHeight;
  294. min-width: 250px;
  295. min-height: 340px;
  296. // 定位
  297. display: flex;
  298. justify-content: center;
  299. align-items: center;
  300. .pic {
  301. display: none;
  302. }
  303. .field {
  304. // 元素
  305. width: inherit;
  306. min-height: inherit;
  307. // 定位
  308. left: 0;
  309. display: flex;
  310. flex-direction: column;
  311. .mobile-title {
  312. // 元素
  313. margin: 0 0 20px;
  314. display: block;
  315. }
  316. .form {
  317. width: $mobileFormWidth;
  318. // - - - tab
  319. :deep(.el-tabs__header) {
  320. display: none;
  321. }
  322. :deep(.el-tabs__content) {
  323. padding: 0;
  324. }
  325. // - - - input
  326. :deep(.el-input__inner) {
  327. height: $mobileRowHeight;
  328. line-height: 24px;
  329. // 文字
  330. text-align: center;
  331. color: #262626;
  332. }
  333. :deep(.el-form-item) {
  334. .button-code {
  335. // 元素
  336. height: $mobileRowHeight;
  337. }
  338. }
  339. .button {
  340. height: $mobileButtonHeight;
  341. line-height: 24px;
  342. color: #FFFFFF;
  343. }
  344. }
  345. .mobile-switch {
  346. display: block;
  347. line-height: 20px;
  348. font-size: 14px;
  349. font-weight: 400;
  350. color: #595959;
  351. margin: 0;
  352. .icon {
  353. width: 14px;
  354. height: 14px;
  355. display: inline-block;
  356. background-image: url($iconBgImage);
  357. background-size: cover;
  358. }
  359. }
  360. .mobile-switch:hover {
  361. cursor: pointer;
  362. }
  363. }
  364. }
  365. .footer {
  366. // 元素
  367. font-size: 12px;
  368. font-family: PingFang SC;
  369. font-weight: 400;
  370. line-height: 17px;
  371. color: #333333;
  372. opacity: 0.6;
  373. // 定位
  374. position: absolute;
  375. bottom: 20px;
  376. }
  377. }
  378. }