login.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. $blue: #1C5CB0;
  2. $gray: #C4C4C4;
  3. * {
  4. margin: 0;
  5. padding: 0;
  6. }
  7. html,
  8. body {
  9. width: 100%;
  10. height: 100%;
  11. }
  12. body {
  13. box-sizing: border-box;
  14. -moz-osx-font-smoothing: grayscale;
  15. -webkit-font-smoothing: antialiased;
  16. text-rendering: optimizeLegibility;
  17. font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
  18. background-color: #F4F7FB;
  19. }
  20. *,
  21. *::before,
  22. *::after {
  23. box-sizing: inherit;
  24. }
  25. a {
  26. border: none;
  27. outline: none;
  28. text-decoration: none;
  29. -webkit-touch-callout: none;
  30. -webkit-tap-highlight-color: transparent;
  31. }
  32. .c-login {
  33. display: flex;
  34. min-height: 100%;
  35. width: 100%;
  36. &__img {
  37. flex: 1 1 400px;
  38. display: inline-block;
  39. background: url('../img/illustration.png') 50% 50% / 757px 613px no-repeat;
  40. }
  41. &__main {
  42. flex: 1 0 auto;
  43. }
  44. }
  45. @media screen and (max-width: 900px) {
  46. .c-login__img {
  47. display: none;
  48. }
  49. }
  50. .c-login-form {
  51. display: inline-flex;
  52. flex-direction: column;
  53. justify-content: center;
  54. align-items: center;
  55. padding: 40px 0 80px;
  56. background-color: #FFFFFF;
  57. overflow: auto;
  58. &__header {
  59. display: inline-flex;
  60. align-items: center;
  61. }
  62. &__logo {
  63. display: inline-block;
  64. width: 142px;
  65. height: 36px;
  66. background: url('../img/logo.png') 0 0 / 100% 100% no-repeat;
  67. }
  68. &__name {
  69. padding-left: 10px;
  70. color: $blue;
  71. font-size: 28px;
  72. font-weight: bold;
  73. line-height: 1;
  74. }
  75. &__tip {
  76. padding: 20px;
  77. height: 100px;
  78. .success {
  79. color: #67C23A;
  80. }
  81. .warning {
  82. color: #E6A23C;
  83. }
  84. .error {
  85. color: #F56C6C;
  86. }
  87. .info {
  88. color: #409EFF;
  89. }
  90. }
  91. &__wrapper {
  92. display: inline-flex;
  93. flex-direction: column;
  94. color: $gray;
  95. }
  96. &__error {
  97. height: 30px;
  98. color: #F56C6C;
  99. font-size: 12px;
  100. line-height: 24px;
  101. white-space: nowrap;
  102. }
  103. &__label {
  104. font-size: 24px;
  105. line-height: 1;
  106. }
  107. &__section {
  108. display: inline-flex;
  109. align-items: center;
  110. padding: 8px 0 2px;
  111. border-bottom: 1px solid currentColor;
  112. }
  113. &__input {
  114. width: 320px;
  115. height: 30px;
  116. font-size: 18px;
  117. line-height: 30px;
  118. border: none;
  119. outline: none;
  120. &.password {
  121. -webkit-text-security: disc;
  122. }
  123. }
  124. &__icon {
  125. display: inline-block;
  126. margin-left: 10px;
  127. width: 30px;
  128. height: 30px;
  129. background-position: 0 0;
  130. background-size: 100% 100%;
  131. background-repeat: no-repeat;
  132. &.user {
  133. background-image: url('../img/icon_user.png')
  134. }
  135. &.lock {
  136. background-image: url('../img/icon_lock.png')
  137. }
  138. }
  139. &__submit {
  140. display: inline-flex;
  141. justify-content: center;
  142. align-items: center;
  143. width: 360px;
  144. height: 40px;
  145. margin-top: 50px;
  146. color: #ffffff;
  147. font-size: 18px;
  148. border: none;
  149. background-color: $blue;
  150. border-radius: 8px;
  151. cursor: pointer;
  152. &[disabled] {
  153. background-color: $gray;
  154. }
  155. }
  156. }