common.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /* image */
  2. .img-circle {
  3. border-radius: 50%;
  4. }
  5. .img-lg {
  6. width: 120px;
  7. height: 120px;
  8. }
  9. /** 表单布局 **/
  10. .form-header {
  11. padding-bottom: 5px;
  12. margin: 8px 10px 25px;
  13. font-size: 15px;
  14. border-bottom: 1px solid #dddddd;
  15. }
  16. .avatar-upload-preview {
  17. position: absolute;
  18. top: 50%;
  19. width: 200px;
  20. height: 200px;
  21. overflow: hidden;
  22. border-radius: 50%;
  23. box-shadow: 0 0 4px #cccccc;
  24. transform: translate(50%, -50%);
  25. }
  26. .pull-right {
  27. float: right !important;
  28. }
  29. /* flex */
  30. .flx-center {
  31. display: flex;
  32. align-items: center;
  33. justify-content: center;
  34. }
  35. .flx-justify-between {
  36. display: flex;
  37. align-items: center;
  38. justify-content: space-between;
  39. }
  40. .flx-align-center {
  41. display: flex;
  42. align-items: center;
  43. }
  44. /* clearfix */
  45. .clearfix::after {
  46. display: block;
  47. height: 0;
  48. overflow: hidden;
  49. clear: both;
  50. content: '';
  51. }
  52. /* 文字单行省略号 */
  53. .sle {
  54. overflow: hidden;
  55. text-overflow: ellipsis;
  56. white-space: nowrap;
  57. }
  58. .text-center {
  59. text-align: center;
  60. }
  61. /* 文字多行省略号 */
  62. .mle {
  63. display: -webkit-box;
  64. overflow: hidden;
  65. -webkit-box-orient: vertical;
  66. -webkit-line-clamp: 2;
  67. }
  68. /* 文字多了自动換行 */
  69. .break-word {
  70. word-break: break-all;
  71. word-wrap: break-word;
  72. }
  73. /* fade-transform */
  74. .fade-transform-leave-active,
  75. .fade-transform-enter-active {
  76. transition: all 0.2s;
  77. }
  78. .fade-transform-enter-from {
  79. opacity: 0;
  80. transition: all 0.2s;
  81. transform: translateX(-30px);
  82. }
  83. .fade-transform-leave-to {
  84. opacity: 0;
  85. transition: all 0.2s;
  86. transform: translateX(30px);
  87. }
  88. /* breadcrumb-transform */
  89. .breadcrumb-enter-active {
  90. transition: all 0.2s;
  91. }
  92. .breadcrumb-enter-from,
  93. .breadcrumb-leave-active {
  94. opacity: 0;
  95. transform: translateX(10px);
  96. }
  97. /* scroll bar */
  98. ::-webkit-scrollbar {
  99. width: 6px;
  100. height: 6px;
  101. }
  102. ::-webkit-scrollbar-thumb {
  103. background-color: var(--el-border-color-darker);
  104. border-radius: 20px;
  105. }
  106. /* nprogress */
  107. #nprogress .bar {
  108. background: var(--el-color-primary) !important;
  109. }
  110. #nprogress .spinner-icon {
  111. border-top-color: var(--el-color-primary) !important;
  112. border-left-color: var(--el-color-primary) !important;
  113. }
  114. #nprogress .peg {
  115. box-shadow:
  116. 0 0 10px var(--el-color-primary),
  117. 0 0 5px var(--el-color-primary) !important;
  118. }
  119. /* 外边距、内边距全局样式 */
  120. @for $i from 0 through 100 {
  121. .mt#{$i} {
  122. margin-top: #{$i}px !important;
  123. }
  124. .mr#{$i} {
  125. margin-right: #{$i}px !important;
  126. }
  127. .mb#{$i} {
  128. margin-bottom: #{$i}px !important;
  129. }
  130. .ml#{$i} {
  131. margin-left: #{$i}px !important;
  132. }
  133. .pt#{$i} {
  134. padding-top: #{$i}px !important;
  135. }
  136. .pr#{$i} {
  137. padding-right: #{$i}px !important;
  138. }
  139. .pb#{$i} {
  140. padding-bottom: #{$i}px !important;
  141. }
  142. .pl#{$i} {
  143. padding-left: #{$i}px !important;
  144. }
  145. }