common.css 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. body {
  2. background-color: #F5F5F5;
  3. }
  4. view,text {
  5. font-size: 24rpx;
  6. color: #333;
  7. }
  8. image {
  9. display: block;
  10. }
  11. /* 隐藏scroll-view 滚动条 */
  12. ::-webkit-scrollbar {
  13. display: none;
  14. }
  15. .iPhone-bottom {
  16. padding-bottom: constant(safe-area-inset-bottom);
  17. padding-bottom: env(safe-area-inset-bottom);
  18. }
  19. /* 不换行 */
  20. .view-nowrap{
  21. white-space: nowrap;
  22. }
  23. /* 自动换行 */
  24. .view-word-wrap{
  25. white-space: pre-wrap;
  26. word-wrap: break-word;
  27. }
  28. /*超出三行... */
  29. .text-overflow-ellipsis-t {
  30. text-overflow: -o-ellipsis-lastline;
  31. overflow: hidden;
  32. text-overflow: ellipsis;
  33. display: -webkit-box;
  34. -webkit-line-clamp: 3;
  35. line-clamp: 3;
  36. -webkit-box-orient: vertical;
  37. white-space: pre-wrap;
  38. word-wrap: break-word;
  39. }
  40. /*超出两行... */
  41. .text-overflow-ellipsis {
  42. text-overflow: -o-ellipsis-lastline;
  43. overflow: hidden;
  44. text-overflow: ellipsis;
  45. display: -webkit-box;
  46. -webkit-line-clamp: 2;
  47. line-clamp: 2;
  48. -webkit-box-orient: vertical;
  49. white-space: pre-wrap;
  50. word-wrap: break-word;
  51. }
  52. /*超出一行... */
  53. .text-overflow-ellipsis-one {
  54. white-space: nowrap;
  55. text-overflow: ellipsis;
  56. overflow: hidden;
  57. word-break: break-all;
  58. }
  59. /* 内部盒子 */
  60. .box-border-box{
  61. box-sizing: border-box;
  62. }
  63. .flex-common-css {
  64. width: 100%;
  65. height: 100vh;
  66. display: flex;
  67. flex-direction: column;
  68. }
  69. .flex-index-css {
  70. width: 100%;
  71. height: 100%;
  72. display: flex;
  73. flex-direction: column;
  74. }
  75. .flex-direction {
  76. display: flex;
  77. flex-direction: column;
  78. }
  79. .display-flex {
  80. display: flex;
  81. }
  82. .flex-justify-space {
  83. display: flex;
  84. justify-content: space-between;
  85. }
  86. .flex-justify-around {
  87. display: flex;
  88. justify-content: space-around;
  89. }
  90. .flex-justify-center {
  91. display: flex;
  92. justify-content: center;
  93. }
  94. .flex-justify-end {
  95. display: flex;
  96. justify-content: flex-end;
  97. }
  98. .flex-justify-start {
  99. display: flex;
  100. justify-content: flex-start;
  101. }
  102. .align-items-center {
  103. display: flex;
  104. align-items: center;
  105. }
  106. .align-items-flex-end {
  107. display: flex;
  108. align-items: flex-end;
  109. }
  110. .flex-wrap-wrap {
  111. display: flex;
  112. flex-wrap: wrap;
  113. }
  114. .common-view-css{
  115. width: 100%;
  116. flex: 1;
  117. }
  118. .scroll-view-css {
  119. width: 100%;
  120. flex: 1;
  121. overflow: auto;
  122. }
  123. .box-sizing-border {
  124. box-sizing: border-box;
  125. }
  126. .text-align-center {
  127. text-align: center;
  128. }
  129. .text-align-right {
  130. text-align: right;
  131. }
  132. .text-align-left {
  133. text-align: left;
  134. }
  135. .flex-1{
  136. flex: 1;
  137. }
  138. .flex-shrink0{
  139. flex-shrink: 0;
  140. }
  141. /* 字体大小 */
  142. .fs-20{
  143. font-size: 20rpx;
  144. }
  145. .fs-22{
  146. font-size: 22rpx;
  147. }
  148. .fs-24{
  149. font-size: 24rpx;
  150. }
  151. .fs-26{
  152. font-size: 26rpx;
  153. }
  154. .fs-32{
  155. font-size: 32rpx;
  156. }
  157. .fs-34{
  158. font-size: 34rpx;
  159. }
  160. /* 字体粗细 */
  161. .fw-b{
  162. font-weight: bold;
  163. }
  164. .fw-400{
  165. font-weight: 400;
  166. }
  167. .fw-500{
  168. font-weight: 500;
  169. }
  170. .fw-600{
  171. font-weight: 600;
  172. }
  173. /* 字体颜色 */
  174. .fc-f{
  175. color: #fff;
  176. }
  177. .fc-0{
  178. color: #000;
  179. }
  180. .fc-3{
  181. color: #333;
  182. }
  183. .fc-6{
  184. color: #666;
  185. }
  186. .fc-9{
  187. color: #999;
  188. }
  189. /* 背景颜色 */
  190. .bgc-f{
  191. background-color: #fff;
  192. }
  193. .bgc-3{
  194. background-color: #333;
  195. }
  196. .bgc-9{
  197. background-color: #999;
  198. }
  199. /* 圆角 */
  200. .b-rad-20{
  201. border-radius: 20rpx;
  202. }
  203. /* 内边距 */
  204. .p-24{
  205. padding: 24rpx;
  206. }
  207. .p-t-10 {
  208. padding-top: 10rpx;
  209. }
  210. .p-b-20 {
  211. padding-bottom: 20rpx;
  212. }
  213. /* 外边距 */
  214. .m-24{
  215. margin: 24rpx;
  216. }
  217. .ml-10{
  218. margin-left: 10rpx;
  219. }
  220. .mr-24{
  221. margin-right: 24rpx;
  222. }
  223. .mb-12{
  224. margin-bottom: 12rpx;
  225. }
  226. .mb-22{
  227. margin-bottom: 22rpx;
  228. }
  229. .mb-24{
  230. margin-bottom: 24rpx;
  231. }
  232. .mb-64{
  233. margin-bottom: 64rpx;
  234. }
  235. /* 宽度 */
  236. .w-100{
  237. width: 100rpx;
  238. }
  239. .w-200{
  240. width: 200rpx;
  241. }
  242. .w-10030{
  243. width: 30%;
  244. }