lj-common.less 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /* flex */
  2. .flx-center {
  3. display: flex;
  4. align-items: center;
  5. justify-content: center;
  6. }
  7. .flx-start {
  8. display: flex;
  9. align-items: center;
  10. justify-content: flex-start;
  11. }
  12. .flx-start-start {
  13. display: flex;
  14. align-items: flex-start;
  15. justify-content: flex-start;
  16. }
  17. .flx-start-end {
  18. display: flex;
  19. align-items: flex-end;
  20. justify-content: flex-start;
  21. }
  22. .flx-end {
  23. display: flex;
  24. align-items: center;
  25. justify-content: flex-end;
  26. }
  27. .flx-end-end {
  28. display: flex;
  29. align-items: flex-end;
  30. justify-content: flex-end;
  31. }
  32. .flx-justify-between {
  33. display: flex;
  34. align-items: center;
  35. justify-content: space-between;
  36. }
  37. .flx-align-center {
  38. display: flex;
  39. align-items: center;
  40. }
  41. .flx-col {
  42. display: flex;
  43. flex-direction: column;
  44. }
  45. .flx-shrink {
  46. flex-shrink: 0;
  47. }
  48. .flx {
  49. display: flex;
  50. }
  51. .user-sel-none {
  52. -webkit-user-select: none;
  53. -moz-user-select: none;
  54. -ms-user-select: none;
  55. user-select: none;
  56. }
  57. /* flex布局 */
  58. .flx-1 {
  59. flex: 1;
  60. }
  61. .flx-2 {
  62. flex: 2;
  63. }
  64. .flx-3 {
  65. flex: 3;
  66. }
  67. .w-screen {
  68. width: 100vw;
  69. }
  70. .h-screen {
  71. height: 100vh;
  72. }
  73. .w-full {
  74. width: 100% !important;
  75. }
  76. .w-auto {
  77. width: auto !important;
  78. }
  79. .h-full {
  80. height: 100%;
  81. }
  82. .h-auto {
  83. height: auto !important;
  84. }
  85. .relative {
  86. position: relative;
  87. }
  88. .absolute {
  89. position: absolute;
  90. }
  91. .overflow-hidden {
  92. overflow: hidden;
  93. }
  94. .overflow-auto {
  95. overflow: auto;
  96. }
  97. .overflow-x-auto {
  98. overflow-x: auto;
  99. }
  100. /* clearfix */
  101. .clearfix::after {
  102. display: block;
  103. height: 0;
  104. overflow: hidden;
  105. clear: both;
  106. content: "";
  107. }
  108. /* 文字单行省略号 */
  109. .sle {
  110. overflow: hidden;
  111. text-overflow: ellipsis;
  112. white-space: nowrap;
  113. }
  114. /* 文字多行省略号 */
  115. .mle {
  116. display: -webkit-box;
  117. -webkit-line-clamp: 2;
  118. -webkit-box-orient: vertical; /* 配合 -webkit-line-clamp 使用 */
  119. // display: box;
  120. line-clamp: 2;
  121. box-orient: vertical; /* 标准属性的兼容写法 */
  122. overflow: hidden;
  123. }
  124. /* 文字多了自动換行 */
  125. .break-word {
  126. word-break: break-all;
  127. word-wrap: break-word;
  128. }
  129. /* 文字不換行 */
  130. .white-nowrap-word {
  131. white-space: nowrap;
  132. }
  133. /* fade-transform */
  134. .fade-transform-leave-active,
  135. .fade-transform-enter-active {
  136. transition: all 0.2s;
  137. }
  138. .fade-transform-enter-from {
  139. opacity: 0;
  140. transition: all 0.2s;
  141. transform: translateX(-30px);
  142. }
  143. .fade-transform-leave-to {
  144. opacity: 0;
  145. transition: all 0.2s;
  146. transform: translateX(30px);
  147. }
  148. /* breadcrumb-transform */
  149. .breadcrumb-enter-active {
  150. transition: all 0.2s;
  151. }
  152. .breadcrumb-enter-from,
  153. .breadcrumb-leave-active {
  154. opacity: 0;
  155. transform: translateX(10px);
  156. }