colorui.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. body {
  2. background-color: #f1f1f1;
  3. font-size: 28upx;
  4. color: #333333;
  5. font-family: Helvetica Neue, Helvetica, sans-serif;
  6. }
  7. view,
  8. scroll-view,
  9. swiper,
  10. button,
  11. input,
  12. textarea,
  13. label,
  14. navigator,
  15. image {
  16. box-sizing: border-box;
  17. }
  18. .round {
  19. border-radius: 5000upx;
  20. }
  21. .radius {
  22. border-radius: 6upx;
  23. }
  24. /* ==================
  25. 开关
  26. ==================== */
  27. switch,
  28. checkbox,
  29. radio {
  30. position: relative;
  31. }
  32. switch::after,
  33. switch::before {
  34. font-family: "cuIcon";
  35. /* content: "\e645"; */
  36. position: absolute;
  37. color: #ffffff !important;
  38. top: 0%;
  39. left: 0upx;
  40. font-size: 26upx;
  41. line-height: 26px;
  42. width: 50%;
  43. text-align: center;
  44. pointer-events: none;
  45. transform: scale(0, 0);
  46. transition: all 0.3s ease-in-out 0s;
  47. z-index: 9;
  48. bottom: 0;
  49. height: 26px;
  50. margin: auto;
  51. }
  52. switch::before {
  53. /* content: "\e646"; */
  54. right: 0;
  55. transform: scale(1, 1);
  56. left: auto;
  57. }
  58. switch[checked]::after,
  59. switch.checked::after {
  60. transform: scale(1, 1);
  61. }
  62. switch[checked]::before,
  63. switch.checked::before {
  64. transform: scale(0, 0);
  65. }
  66. /* #ifndef MP-ALIPAY */
  67. radio::before,
  68. checkbox::before {
  69. font-family: "cuIcon";
  70. /* content: "\e645"; */
  71. position: absolute;
  72. color: #ffffff !important;
  73. top: 50%;
  74. margin-top: -8px;
  75. right: 5px;
  76. font-size: 32upx;
  77. line-height: 16px;
  78. pointer-events: none;
  79. transform: scale(1, 1);
  80. transition: all 0.3s ease-in-out 0s;
  81. z-index: 9;
  82. }
  83. radio .wx-radio-input,
  84. checkbox .wx-checkbox-input,
  85. radio .uni-radio-input,
  86. checkbox .uni-checkbox-input {
  87. margin: 0;
  88. width: 24px;
  89. height: 24px;
  90. }
  91. checkbox.round .wx-checkbox-input,
  92. checkbox.round .uni-checkbox-input {
  93. border-radius: 100upx;
  94. }
  95. /* #endif */
  96. switch[checked]::before {
  97. transform: scale(0, 0);
  98. }
  99. switch .wx-switch-input,
  100. switch .uni-switch-input {
  101. border: none;
  102. padding: 0 24px;
  103. width: 48px;
  104. height: 26px;
  105. margin: 0;
  106. border-radius: 100upx;
  107. }
  108. switch .wx-switch-input:not([class*="bg-"]),
  109. switch .uni-switch-input:not([class*="bg-"]) {
  110. background: #8799a3 !important;
  111. }
  112. switch .wx-switch-input::after,
  113. switch .uni-switch-input::after {
  114. margin: auto;
  115. width: 26px;
  116. height: 26px;
  117. border-radius: 100upx;
  118. left: 0upx;
  119. top: 0upx;
  120. bottom: 0upx;
  121. position: absolute;
  122. transform: scale(0.9, 0.9);
  123. transition: all 0.1s ease-in-out 0s;
  124. }
  125. switch .wx-switch-input.wx-switch-input-checked::after,
  126. switch .uni-switch-input.uni-switch-input-checked::after {
  127. margin: auto;
  128. left: 22px;
  129. box-shadow: none;
  130. transform: scale(0.9, 0.9);
  131. }
  132. radio-group {
  133. display: inline-block;
  134. }
  135. switch.radius .wx-switch-input::after,
  136. switch.radius .wx-switch-input,
  137. switch.radius .wx-switch-input::before,
  138. switch.radius .uni-switch-input::after,
  139. switch.radius .uni-switch-input,
  140. switch.radius .uni-switch-input::before {
  141. border-radius: 10upx;
  142. }
  143. switch .wx-switch-input::before,
  144. radio.radio::before,
  145. checkbox .wx-checkbox-input::before,
  146. radio .wx-radio-input::before,
  147. switch .uni-switch-input::before,
  148. radio.radio::before,
  149. checkbox .uni-checkbox-input::before,
  150. radio .uni-radio-input::before {
  151. display: none;
  152. }
  153. radio.radio[checked]::after,
  154. radio.radio .uni-radio-input-checked::after {
  155. content: "";
  156. background-color: transparent;
  157. display: block;
  158. position: absolute;
  159. width: 8px;
  160. height: 8px;
  161. z-index: 999;
  162. top: 0upx;
  163. left: 0upx;
  164. right: 0;
  165. bottom: 0;
  166. margin: auto;
  167. border-radius: 200upx;
  168. /* #ifndef MP */
  169. border: 7px solid #ffffff !important;
  170. /* #endif */
  171. /* #ifdef MP */
  172. border: 8px solid #ffffff !important;
  173. /* #endif */
  174. }
  175. .switch-sex::after {
  176. content: "\e71c";
  177. }
  178. .switch-sex::before {
  179. content: "\e71a";
  180. }
  181. .switch-sex .wx-switch-input,
  182. .switch-sex .uni-switch-input {
  183. background: #e54d42 !important;
  184. border-color: #e54d42 !important;
  185. }
  186. .switch-sex[checked] .wx-switch-input,
  187. .switch-sex.checked .uni-switch-input {
  188. background: #0081ff !important;
  189. border-color: #0081ff !important;
  190. }
  191. switch.red[checked] .wx-switch-input.wx-switch-input-checked,
  192. checkbox.red[checked] .wx-checkbox-input,
  193. radio.red[checked] .wx-radio-input,
  194. switch.red.checked .uni-switch-input.uni-switch-input-checked,
  195. checkbox.red.checked .uni-checkbox-input,
  196. radio.red.checked .uni-radio-input {
  197. background-color: #e54d42 !important;
  198. border-color: #e54d42 !important;
  199. color: #ffffff !important;
  200. }
  201. switch.orange[checked] .wx-switch-input,
  202. checkbox.orange[checked] .wx-checkbox-input,
  203. radio.orange[checked] .wx-radio-input,
  204. switch.orange.checked .uni-switch-input,
  205. checkbox.orange.checked .uni-checkbox-input,
  206. radio.orange.checked .uni-radio-input {
  207. background-color: #f37b1d !important;
  208. border-color: #f37b1d !important;
  209. color: #ffffff !important;
  210. }
  211. switch.yellow[checked] .wx-switch-input,
  212. checkbox.yellow[checked] .wx-checkbox-input,
  213. radio.yellow[checked] .wx-radio-input,
  214. switch.yellow.checked .uni-switch-input,
  215. checkbox.yellow.checked .uni-checkbox-input,
  216. radio.yellow.checked .uni-radio-input {
  217. background-color: #fbbd08 !important;
  218. border-color: #fbbd08 !important;
  219. color: #333333 !important;
  220. }
  221. switch.olive[checked] .wx-switch-input,
  222. checkbox.olive[checked] .wx-checkbox-input,
  223. radio.olive[checked] .wx-radio-input,
  224. switch.olive.checked .uni-switch-input,
  225. checkbox.olive.checked .uni-checkbox-input,
  226. radio.olive.checked .uni-radio-input {
  227. background-color: #8dc63f !important;
  228. border-color: #8dc63f !important;
  229. color: #ffffff !important;
  230. }
  231. switch.green[checked] .wx-switch-input,
  232. switch[checked] .wx-switch-input,
  233. checkbox.green[checked] .wx-checkbox-input,
  234. checkbox[checked] .wx-checkbox-input,
  235. radio.green[checked] .wx-radio-input,
  236. radio[checked] .wx-radio-input,
  237. switch.green.checked .uni-switch-input,
  238. switch.checked .uni-switch-input,
  239. checkbox.green.checked .uni-checkbox-input,
  240. checkbox.checked .uni-checkbox-input,
  241. radio.green.checked .uni-radio-input,
  242. radio.checked .uni-radio-input {
  243. background-color: #39b54a !important;
  244. border-color: #39b54a !important;
  245. color: #ffffff !important;
  246. border-color: #39B54A !important;
  247. }
  248. switch.cyan[checked] .wx-switch-input,
  249. checkbox.cyan[checked] .wx-checkbox-input,
  250. radio.cyan[checked] .wx-radio-input,
  251. switch.cyan.checked .uni-switch-input,
  252. checkbox.cyan.checked .uni-checkbox-input,
  253. radio.cyan.checked .uni-radio-input {
  254. background-color: #1cbbb4 !important;
  255. border-color: #1cbbb4 !important;
  256. color: #ffffff !important;
  257. }
  258. switch.blue[checked] .wx-switch-input,
  259. checkbox.blue[checked] .wx-checkbox-input,
  260. radio.blue[checked] .wx-radio-input,
  261. switch.blue.checked .uni-switch-input,
  262. checkbox.blue.checked .uni-checkbox-input,
  263. radio.blue.checked .uni-radio-input {
  264. background-color: #0081ff !important;
  265. border-color: #0081ff !important;
  266. color: #ffffff !important;
  267. }
  268. switch.purple[checked] .wx-switch-input,
  269. checkbox.purple[checked] .wx-checkbox-input,
  270. radio.purple[checked] .wx-radio-input,
  271. switch.purple.checked .uni-switch-input,
  272. checkbox.purple.checked .uni-checkbox-input,
  273. radio.purple.checked .uni-radio-input {
  274. background-color: #6739b6 !important;
  275. border-color: #6739b6 !important;
  276. color: #ffffff !important;
  277. }
  278. switch.mauve[checked] .wx-switch-input,
  279. checkbox.mauve[checked] .wx-checkbox-input,
  280. radio.mauve[checked] .wx-radio-input,
  281. switch.mauve.checked .uni-switch-input,
  282. checkbox.mauve.checked .uni-checkbox-input,
  283. radio.mauve.checked .uni-radio-input {
  284. background-color: #9c26b0 !important;
  285. border-color: #9c26b0 !important;
  286. color: #ffffff !important;
  287. }
  288. switch.pink[checked] .wx-switch-input,
  289. checkbox.pink[checked] .wx-checkbox-input,
  290. radio.pink[checked] .wx-radio-input,
  291. switch.pink.checked .uni-switch-input,
  292. checkbox.pink.checked .uni-checkbox-input,
  293. radio.pink.checked .uni-radio-input {
  294. background-color: #e03997 !important;
  295. border-color: #e03997 !important;
  296. color: #ffffff !important;
  297. }
  298. switch.brown[checked] .wx-switch-input,
  299. checkbox.brown[checked] .wx-checkbox-input,
  300. radio.brown[checked] .wx-radio-input,
  301. switch.brown.checked .uni-switch-input,
  302. checkbox.brown.checked .uni-checkbox-input,
  303. radio.brown.checked .uni-radio-input {
  304. background-color: #a5673f !important;
  305. border-color: #a5673f !important;
  306. color: #ffffff !important;
  307. }
  308. switch.grey[checked] .wx-switch-input,
  309. checkbox.grey[checked] .wx-checkbox-input,
  310. radio.grey[checked] .wx-radio-input,
  311. switch.grey.checked .uni-switch-input,
  312. checkbox.grey.checked .uni-checkbox-input,
  313. radio.grey.checked .uni-radio-input {
  314. background-color: #8799a3 !important;
  315. border-color: #8799a3 !important;
  316. color: #ffffff !important;
  317. }
  318. switch.gray[checked] .wx-switch-input,
  319. checkbox.gray[checked] .wx-checkbox-input,
  320. radio.gray[checked] .wx-radio-input,
  321. switch.gray.checked .uni-switch-input,
  322. checkbox.gray.checked .uni-checkbox-input,
  323. radio.gray.checked .uni-radio-input {
  324. background-color: #f0f0f0 !important;
  325. border-color: #f0f0f0 !important;
  326. color: #333333 !important;
  327. }
  328. switch.black[checked] .wx-switch-input,
  329. checkbox.black[checked] .wx-checkbox-input,
  330. radio.black[checked] .wx-radio-input,
  331. switch.black.checked .uni-switch-input,
  332. checkbox.black.checked .uni-checkbox-input,
  333. radio.black.checked .uni-radio-input {
  334. background-color: #333333 !important;
  335. border-color: #333333 !important;
  336. color: #ffffff !important;
  337. }
  338. switch.white[checked] .wx-switch-input,
  339. checkbox.white[checked] .wx-checkbox-input,
  340. radio.white[checked] .wx-radio-input,
  341. switch.white.checked .uni-switch-input,
  342. checkbox.white.checked .uni-checkbox-input,
  343. radio.white.checked .uni-radio-input {
  344. background-color: #ffffff !important;
  345. border-color: #ffffff !important;
  346. color: #333333 !important;
  347. }
  348. /* ==================
  349. 布局
  350. ==================== */
  351. /* -- flex弹性布局 -- */
  352. .flex {
  353. display: flex;
  354. }
  355. .basis-xs {
  356. flex-basis: 20%;
  357. }
  358. .basis-sm {
  359. flex-basis: 40%;
  360. }
  361. .basis-df {
  362. flex-basis: 50%;
  363. }
  364. .basis-lg {
  365. flex-basis: 60%;
  366. }
  367. .basis-xl {
  368. flex-basis: 80%;
  369. }
  370. .flex-sub {
  371. flex: 1;
  372. }
  373. .flex-twice {
  374. flex: 2;
  375. }
  376. .flex-treble {
  377. flex: 3;
  378. }
  379. .flex-direction {
  380. flex-direction: column;
  381. }
  382. .flex-wrap {
  383. flex-wrap: wrap;
  384. }
  385. .align-start {
  386. align-items: flex-start;
  387. }
  388. .align-end {
  389. align-items: flex-end;
  390. }
  391. .align-center {
  392. align-items: center;
  393. }
  394. .align-stretch {
  395. align-items: stretch;
  396. }
  397. .self-start {
  398. align-self: flex-start;
  399. }
  400. .self-center {
  401. align-self: flex-center;
  402. }
  403. .self-end {
  404. align-self: flex-end;
  405. }
  406. .self-stretch {
  407. align-self: stretch;
  408. }
  409. .align-stretch {
  410. align-items: stretch;
  411. }
  412. .justify-start {
  413. justify-content: flex-start;
  414. }
  415. .justify-end {
  416. justify-content: flex-end;
  417. }
  418. .justify-center {
  419. justify-content: center;
  420. }
  421. .justify-between {
  422. justify-content: space-between;
  423. }
  424. .justify-around {
  425. justify-content: space-around;
  426. }