common.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /* flex */
  2. .center {
  3. display: flex;
  4. justify-content: center;
  5. align-items: center;
  6. }
  7. .flex_between {
  8. display: flex;
  9. justify-content: space-between;
  10. align-items: center;
  11. }
  12. .flex_l {
  13. display: flex;
  14. justify-content: flex-start;
  15. align-items: center;
  16. }
  17. .flex_r {
  18. display: flex;
  19. justify-content: flex-end;
  20. align-items: center;
  21. }
  22. .flex {
  23. display: flex;
  24. }
  25. .algin-center {
  26. align-items: center;
  27. }
  28. .flex-center {
  29. justify-content: center;
  30. }
  31. .flex-around {
  32. justify-content: space-around;
  33. }
  34. .flex-between {
  35. justify-content: space-between;
  36. }
  37. .flex-top {
  38. align-items: flex-start;
  39. }
  40. .flex-middle {
  41. align-items: center;
  42. }
  43. .justify-end {
  44. justify-content: flex-end;
  45. }
  46. .flex-bottom {
  47. align-items: flex-end;
  48. }
  49. .flex-column {
  50. flex-direction: column;
  51. }
  52. .flex-wrap {
  53. flex-wrap: wrap;
  54. }
  55. .flex_1 {
  56. flex: 1;
  57. }
  58. /* 其他 */
  59. .relative {
  60. position: relative;
  61. }
  62. .absolute {
  63. position: absolute;
  64. }
  65. .fixed {
  66. position: fixed;
  67. }
  68. .fixed-bottom {
  69. position: fixed;
  70. bottom: 0;
  71. left: 0;
  72. right: 0;
  73. }
  74. .block {
  75. display: block;
  76. }
  77. .boxshadow {
  78. box-shadow: -1px 0px 12px rgba(0, 0, 0, 0.12);
  79. }
  80. .hide {
  81. display: none;
  82. }
  83. .show {
  84. display: block;
  85. }
  86. .autowrap {
  87. word-wrap: break-word;
  88. word-break: normal;
  89. }
  90. .text-left {
  91. text-align: left;
  92. }
  93. .text-center {
  94. text-align: center;
  95. }
  96. .text-right {
  97. text-align: right;
  98. }
  99. .bold {
  100. font-weight: 600;
  101. }
  102. .over-hidden {
  103. overflow: hidden;
  104. }
  105. .bold {
  106. font-weight: 700;
  107. }
  108. .right {
  109. float: right;
  110. }
  111. .left {
  112. float: left;
  113. }
  114. view {
  115. box-sizing: border-box;
  116. }
  117. .text-ellipsis {
  118. white-space: nowrap;
  119. /*把文本强制显示在一行*/
  120. overflow: hidden;
  121. /*隐藏超出部分的文字*/
  122. text-overflow: ellipsis;
  123. /*超出显示省略号*/
  124. }
  125. .fixed-btn {
  126. position: fixed;
  127. width: 90rpx;
  128. height: 90rpx;
  129. bottom: 50rpx;
  130. right: 50rpx;
  131. background: #3e7ef8;
  132. border-radius: 50%;
  133. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  134. }
  135. /* 宽度全局样式
  136. ------------------------------- */
  137. @for $i from 10 through 200 {
  138. .w#{$i} {
  139. width: #{$i}px !important;
  140. }
  141. }
  142. /* 字体大小全局样式
  143. ------------------------------- */
  144. @for $i from 10 through 64 {
  145. .font#{$i} {
  146. font-size: #{$i}rpx !important;
  147. }
  148. }
  149. /* 外边距、内边距全局样式
  150. ------------------------------- */
  151. @for $i from 1 through 70 {
  152. .mt#{$i} {
  153. margin-top: #{$i}px !important;
  154. }
  155. .mr#{$i} {
  156. margin-right: #{$i}px !important;
  157. }
  158. .mb#{$i} {
  159. margin-bottom: #{$i}px !important;
  160. }
  161. .ml#{$i} {
  162. margin-left: #{$i}px !important;
  163. }
  164. .pt#{$i} {
  165. padding-top: #{$i}px !important;
  166. }
  167. .pr#{$i} {
  168. padding-right: #{$i}px !important;
  169. }
  170. .pb#{$i} {
  171. padding-bottom: #{$i}px !important;
  172. }
  173. .pl#{$i} {
  174. padding-left: #{$i}px !important;
  175. }
  176. }