common.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. /* 颜色 */
  2. .bg{
  3. background-color: $bg;
  4. }
  5. .bg-blue{
  6. background-color: $blue;
  7. }
  8. .bg-green{
  9. background-color: $green;
  10. }
  11. .change-green{
  12. background: linear-gradient(to right,#00b6b4,#00d496);
  13. }
  14. .bg-purple{
  15. background-color: $purple;
  16. }
  17. .bg-red{
  18. background-color: $red;
  19. }
  20. .bg-orange{
  21. background-color: $orange;
  22. }
  23. .bg-white{
  24. background-color: $white;
  25. }
  26. .green{
  27. color: $green;
  28. }
  29. .blue{
  30. color: $blue;
  31. }
  32. .blue-1{
  33. color: $blue-1;
  34. }
  35. .purple{
  36. color: $purple;
  37. }
  38. .red{
  39. color: $red;
  40. }
  41. .white{
  42. color:$white;
  43. }
  44. .gray{
  45. color:$gray;
  46. }
  47. .gray-1{
  48. color:$gray-1;
  49. }
  50. .gray-2{
  51. color:$gray-2;
  52. }
  53. .bg-gray-2{
  54. background-color:$gray-2;
  55. }
  56. // padding margin
  57. @for $value from 1 through 100{
  58. .pd-#{$value}, .ptb-#{$value}, .pt-#{$value} { padding-top: $value*1rpx; }
  59. .pd-#{$value}, .ptb-#{$value}, .pb-#{$value} { padding-bottom: $value*1rpx; }
  60. .pd-#{$value}, .plr-#{$value}, .pl-#{$value} { padding-left: $value*1rpx; }
  61. .pd-#{$value}, .plr-#{$value}, .pr-#{$value} { padding-right: $value*1rpx; }
  62. .mg-#{$value}, .mtb-#{$value}, .mt-#{$value} { margin-top: $value*1rpx; }
  63. .mg-#{$value}, .mtb-#{$value}, .mb-#{$value} { margin-bottom: $value*1rpx; }
  64. .mg-#{$value}, .mlr-#{$value}, .ml-#{$value} { margin-left: $value*1rpx; }
  65. .mg-#{$value}, .mlr-#{$value}, .mr-#{$value} { margin-right: $value*1rpx; }
  66. }
  67. // size
  68. @for $value from 20 through 50{
  69. .size-#{$value}{ font-size: $value*1rpx; }
  70. }
  71. // radius
  72. .radius {
  73. border-radius: 50%;
  74. }
  75. @for $value from 5 through 50{
  76. .radius-#{$value}{ border-radius: $value*1rpx; }
  77. }
  78. /* flex */
  79. .center{
  80. display: flex;
  81. justify-content: center;
  82. align-items: center;
  83. }
  84. .flex{
  85. display: flex;
  86. justify-content: space-between;
  87. align-items: center;
  88. }
  89. .flex_l{
  90. display: flex;
  91. justify-content: flex-start;
  92. align-items: center;
  93. }
  94. .flex_r{
  95. display: flex;
  96. justify-content: flex-end;
  97. align-items: center;
  98. }
  99. .flex1{
  100. display: flex;
  101. }
  102. .flex-start{
  103. justify-content: flex-start;
  104. }
  105. .flex-end{
  106. justify-content: flex-end;
  107. }
  108. .flex-center{
  109. justify-content: center;
  110. }
  111. .flex-around{
  112. justify-content: space-around;
  113. }
  114. .flex-between{
  115. justify-content: space-between;
  116. }
  117. .flex-top{
  118. align-items: flex-start;
  119. }
  120. .flex-middle{
  121. align-items: center;
  122. }
  123. .flex-bottom{
  124. align-items: flex-end;
  125. }
  126. .flex-column{
  127. flex-direction: column;
  128. }
  129. .flex-wrap{
  130. flex-wrap: wrap;
  131. }
  132. /* 边框 */
  133. .border{
  134. border: $border-width-base solid $border-color;
  135. }
  136. .border-blue{
  137. border: $border-width-base solid $blue;
  138. }
  139. .border-green{
  140. border: $border-width-base solid $green;
  141. }
  142. .bt {
  143. border-top: $border-width-base solid $border-color;
  144. }
  145. .bb {
  146. border-bottom: $border-width-base solid $border-color;
  147. }
  148. .bl {
  149. border-left: $border-width-base solid $border-color;
  150. }
  151. .br {
  152. border-right: $border-width-base solid $border-color;
  153. }
  154. /* 全屏 */
  155. .vw100 {
  156. width: 100vw !important;
  157. }
  158. .vh100 {
  159. height: 100vh !important;
  160. }
  161. .min100 {
  162. min-height: 100vh !important;
  163. }
  164. .h100 {
  165. height: 100% !important;
  166. }
  167. .w100 {
  168. width: 100% !important;
  169. }
  170. /* 其他 */
  171. .relative{
  172. position: relative;
  173. }
  174. .absolute{
  175. position: absolute;
  176. }
  177. .fixed{
  178. position: fixed;
  179. }
  180. .fixed-bottom{
  181. position: fixed;
  182. bottom: 0;
  183. left: 0;
  184. right: 0;
  185. z-index: 99;
  186. }
  187. .block{
  188. display: block;
  189. }
  190. .hide {
  191. display: none;
  192. }
  193. .show {
  194. display: block;
  195. }
  196. .autowrap {
  197. word-wrap: break-word;
  198. word-break: normal;
  199. }
  200. .text-left {
  201. text-align: left;
  202. }
  203. .text-center {
  204. text-align: center;
  205. }
  206. .text-right {
  207. text-align: right;
  208. }
  209. .bold {
  210. font-weight: 500;
  211. }
  212. .over-hidden {
  213. overflow: hidden;
  214. }
  215. .size-56 {
  216. font-size: 56rpx;
  217. }
  218. .size-26 {
  219. font-size: 26rpx;
  220. }
  221. .color333 {
  222. color: #333;
  223. }
  224. .color777 {
  225. color: #777;
  226. }