login.scss 9.2 KB

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