global.scss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. /*
  2. * @Author: jmy
  3. * @Date: 2025-12-31 12:02:41
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2025-12-13 16:48:17
  6. * @Description:
  7. */
  8. /* 设置字体为苹方(PingFang SC),若系统无该字体则再次回退到 PingFang SC;强制正常字形;禁止文本大小写转换 */
  9. view,
  10. text {
  11. font-family: PingFang SC, PingFang SC;
  12. font-style: normal;
  13. text-transform: none;
  14. }
  15. view{
  16. box-sizing: border-box;
  17. }
  18. // 导航栏头部
  19. .uni-navbar__header {
  20. display: flex;
  21. align-items: center;
  22. padding: 0 24rpx !important;
  23. box-sizing: border-box;
  24. }
  25. .uni-navbar__header-container {
  26. padding: 0 !important;
  27. }
  28. .scs-headr-default {
  29. width: 73%;
  30. }
  31. /* #ifndef APP-NVUE */
  32. /* Display */
  33. .flex {
  34. display: flex;
  35. display: -webkit-flex;
  36. }
  37. /* Flex Direction */
  38. /* 主轴方向:水平,起点在左侧 */
  39. .flex-row {
  40. flex-direction: row;
  41. -webkit-flex-direction: row;
  42. }
  43. /* 主轴方向:水平,起点在右侧 */
  44. .flex-row-reverse {
  45. flex-direction: row-reverse;
  46. -webkit-flex-direction: row-reverse;
  47. }
  48. /* 主轴方向:垂直,起点在上方 */
  49. .flex-column {
  50. flex-direction: column;
  51. -webkit-flex-direction: column;
  52. }
  53. /* 主轴方向:垂直,起点在下方 */
  54. .flex-column-reverse {
  55. flex-direction: column-reverse;
  56. -webkit-flex-direction: column-reverse;
  57. }
  58. /* Flex Wrap */
  59. /* 主轴方向换行:空间不足时自动换行*/
  60. .flex-wrap {
  61. flex-wrap: wrap;
  62. -webkit-flex-wrap: wrap;
  63. }
  64. /*主轴方向不换行:所有子项强制单行/列*/
  65. .flex-nowrap {
  66. flex-wrap: nowrap;
  67. -webkit-flex-wrap: nowrap;
  68. }
  69. /*主轴方向反向换行:空间不足时自动换行,且行序反转*/
  70. .flex-wrap-reverse {
  71. flex-wrap: wrap-reverse;
  72. -webkit-flex-wrap: wrap-reverse;
  73. }
  74. /* Justify Content */
  75. /*主轴对齐:子项在主轴起点对齐*/
  76. .justify-start {
  77. justify-content: flex-start;
  78. -webkit-justify-content: flex-start;
  79. }
  80. /*主轴对齐:子项在主轴起点对齐*/
  81. .justify-center {
  82. justify-content: center;
  83. -webkit-justify-content: center;
  84. }
  85. /* 主轴对齐:子项在主轴终点对齐 */
  86. .justify-end {
  87. justify-content: flex-end;
  88. -webkit-justify-content: flex-end;
  89. }
  90. /* 主轴对齐:首尾子项贴边,其余子项间距相等 */
  91. .justify-between {
  92. justify-content: space-between;
  93. -webkit-justify-content: space-between;
  94. }
  95. /* 主轴对齐:每个子项两侧的间距相等,首尾子项与容器边缘间距为中间间距的一半 */
  96. .justify-around {
  97. justify-content: space-around;
  98. -webkit-justify-content: space-around;
  99. }
  100. /* 主轴对齐:项目之间与两端间距完全相等 */
  101. .justify-evenly {
  102. justify-content: space-evenly;
  103. -webkit-justify-content: space-evenly;
  104. }
  105. /* Align Items */
  106. /* 交叉轴对齐:子项顶部对齐 */
  107. .items-start {
  108. align-items: flex-start;
  109. -webkit-align-items: flex-start;
  110. }
  111. /* 交叉轴对齐:子项居中对齐 */
  112. .items-center {
  113. align-items: center;
  114. -webkit-align-items: center;
  115. }
  116. /* 交叉轴对齐:子项底部对齐 */
  117. .items-end {
  118. align-items: flex-end;
  119. -webkit-align-items: flex-end;
  120. }
  121. /* 交叉轴对齐:子项拉伸填满容器高度 */
  122. .items-stretch {
  123. align-items: stretch;
  124. -webkit-align-items: stretch;
  125. }
  126. /* 交叉轴对齐:子项基线对齐 */
  127. .items-baseline {
  128. align-items: baseline;
  129. -webkit-align-items: baseline;
  130. }
  131. /* 快捷 flex 值:占满剩余空间 */
  132. .flex-1 {
  133. flex: 1;
  134. -webkit-flex: 1;
  135. }
  136. /* 自动伸缩:根据内容决定尺寸,可伸可缩 */
  137. .flex-auto {
  138. flex: auto;
  139. -webkit-flex: auto;
  140. }
  141. /* 初始尺寸:使用 flex-basis 定义的初始大小,可伸可缩 */
  142. .flex-initial {
  143. flex: initial;
  144. -webkit-flex: initial;
  145. }
  146. /* 不伸缩:固定尺寸,不参与分配剩余空间 */
  147. .flex-none {
  148. flex: none;
  149. -webkit-flex: none;
  150. }
  151. /* 禁止放大 */
  152. .flex-grow-0 {
  153. flex-grow: 0;
  154. -webkit-flex-grow: 0;
  155. }
  156. /* 允许放大并占满剩余空间 */
  157. .flex-grow-1 {
  158. flex-grow: 1;
  159. -webkit-flex-grow: 1;
  160. }
  161. /* 禁止缩小 */
  162. .flex-shrink-0 {
  163. flex-shrink: 0;
  164. -webkit-flex-shrink: 0;
  165. }
  166. /* 允许缩小 */
  167. .flex-shrink-1 {
  168. flex-shrink: 1;
  169. -webkit-flex-shrink: 1;
  170. }
  171. /* #endif */
  172. .fw-400 {
  173. font-weight: 400;
  174. }
  175. .fw-500 {
  176. font-weight: 500;
  177. }
  178. .fw-600 {
  179. font-weight: 600;
  180. }
  181. /* 文本对齐方式 */
  182. .text-left {
  183. text-align: left;
  184. }
  185. .text-center {
  186. text-align: center;
  187. }
  188. .text-right {
  189. text-align: right;
  190. }
  191. .text-justify {
  192. text-align: justify;
  193. }
  194. .text-start {
  195. text-align: start;
  196. }
  197. .text-end {
  198. text-align: end;
  199. }
  200. .w-100vw {
  201. width: 100vw;
  202. }
  203. .h-100vh {
  204. height: 100vh;
  205. }
  206. .w-all {
  207. width: 100%;
  208. }
  209. .h-all {
  210. height: 100%;
  211. }
  212. .relative {
  213. position: relative;
  214. }
  215. .absolute {
  216. position: absolute;
  217. }
  218. .fixed {
  219. position: fixed;
  220. }
  221. /* Overflow */
  222. .overflow-visible {
  223. overflow: visible;
  224. }
  225. .overflow-hidden {
  226. overflow: hidden;
  227. }
  228. .overflow-scroll {
  229. overflow: scroll;
  230. }
  231. .overflow-auto {
  232. overflow: auto;
  233. }
  234. .overflow-x-visible {
  235. overflow-x: visible;
  236. }
  237. .overflow-x-hidden {
  238. overflow-x: hidden;
  239. }
  240. .overflow-x-scroll {
  241. overflow-x: scroll;
  242. }
  243. .overflow-x-auto {
  244. overflow-x: auto;
  245. }
  246. .overflow-y-visible {
  247. overflow-y: visible;
  248. }
  249. .overflow-y-hidden {
  250. overflow-y: hidden;
  251. }
  252. .overflow-y-scroll {
  253. overflow-y: scroll;
  254. }
  255. .overflow-y-auto {
  256. overflow-y: auto;
  257. }
  258. .inline-block {
  259. display: inline-block;
  260. }
  261. .m-auto {
  262. margin:0 auto;
  263. }
  264. /* (-500 to 1000px, all numbers, auto convert to rpx: px * 2 = rpx) */
  265. @for $i from -500 through 1000 {
  266. $size: $i * 2rpx;
  267. /* top */
  268. .top-#{$i} {
  269. top: $size;
  270. }
  271. /* left */
  272. .left-#{$i} {
  273. left: $size;
  274. }
  275. /* right */
  276. .right-#{$i} {
  277. right: $size;
  278. }
  279. /* bottom */
  280. .bottom-#{$i} {
  281. bottom: $size;
  282. }
  283. }
  284. /* z-index (-100 to 10000 all numbers) */
  285. @for $i from -100 through 10000 {
  286. .zi-#{$i} {
  287. z-index: $i;
  288. }
  289. }
  290. /* Font sizes (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  291. @for $i from 1 through 100 {
  292. $size: $i * 2rpx;
  293. .fs-#{$i} {
  294. font-size: $size;
  295. }
  296. }
  297. /* line height (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  298. @for $i from 1 through 100 {
  299. $size: $i * 2rpx;
  300. .lh-#{$i} {
  301. line-height: $size;
  302. }
  303. }
  304. /* Margins (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  305. @for $i from -500 through 500 {
  306. $size: $i * 2rpx;
  307. /* Margin */
  308. .m-#{$i} {
  309. margin: $size;
  310. }
  311. /* Margin top */
  312. .mt-#{$i} {
  313. margin-top: $size;
  314. }
  315. /* Margin right */
  316. .mr-#{$i} {
  317. margin-right: $size;
  318. }
  319. /* Margin bottom */
  320. .mb-#{$i} {
  321. margin-bottom: $size;
  322. }
  323. /* Margin left */
  324. .ml-#{$i} {
  325. margin-left: $size;
  326. }
  327. /* Margin horizontal */
  328. .mx-#{$i} {
  329. margin-left: $size;
  330. margin-right: $size;
  331. }
  332. /* Margin vertical */
  333. .my-#{$i} {
  334. margin-top: $size;
  335. margin-bottom: $size;
  336. }
  337. }
  338. /* Paddings (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  339. @for $i from 1 through 100 {
  340. $size: $i * 2rpx;
  341. /* Padding */
  342. .p-#{$i} {
  343. padding: $size;
  344. }
  345. /* Padding top */
  346. .pt-#{$i} {
  347. padding-top: $size;
  348. }
  349. /* Padding right */
  350. .pr-#{$i} {
  351. padding-right: $size;
  352. }
  353. /* Padding bottom */
  354. .pb-#{$i} {
  355. padding-bottom: $size;
  356. }
  357. /* Padding left */
  358. .pl-#{$i} {
  359. padding-left: $size;
  360. }
  361. /* Padding horizontal */
  362. .px-#{$i} {
  363. padding-left: $size;
  364. padding-right: $size;
  365. }
  366. /* Padding vertical */
  367. .py-#{$i} {
  368. padding-top: $size;
  369. padding-bottom: $size;
  370. }
  371. }
  372. /* Gaps (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  373. /* #ifndef APP-NVUE */
  374. @for $i from 1 through 100 {
  375. $size: $i * 2rpx;
  376. .gap-#{$i} {
  377. gap: $size;
  378. }
  379. }
  380. /* #endif */
  381. /* Widths (1px to 375px, all numbers, auto convert to rpx: px * 2 = rpx) */
  382. @for $i from 1 through 1000 {
  383. $size: $i * 2rpx;
  384. .w-#{$i} {
  385. width: $size;
  386. }
  387. }
  388. /* Heights (1px to 375px, all numbers, auto convert to rpx: px * 2 = rpx) */
  389. @for $i from 1 through 1000 {
  390. $size: $i * 2rpx;
  391. .h-#{$i} {
  392. height: $size;
  393. }
  394. }
  395. /* Border Radius (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  396. @for $i from 1 through 100 {
  397. $size: $i * 2rpx;
  398. .rounded-#{$i} {
  399. border-radius: $size;
  400. }
  401. }
  402. @for $i from 1 through 100 {
  403. $size: $i * 2rpx;
  404. .rounded-t-#{$i} {
  405. border-top-left-radius: $size;
  406. border-top-right-radius: $size;
  407. }
  408. }
  409. @for $i from 1 through 100 {
  410. $size: $i * 2rpx;
  411. .rounded-b-#{$i} {
  412. border-bottom-left-radius: $size;
  413. border-bottom-right-radius: $size;
  414. }
  415. }
  416. /* Line Height (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  417. @for $i from 1 through 100 {
  418. $size: $i * 2rpx;
  419. .lh-#{$i} {
  420. line-height: $size;
  421. }
  422. }
  423. /* Border Widths (0.5px to 20px, auto convert to rpx: px * 2 = rpx) */
  424. // 0.5px border (1rpx)
  425. .border-w-05 {
  426. border-width: 1rpx;
  427. }
  428. .border-t-w-05 {
  429. border-top-width: 1rpx;
  430. }
  431. .border-r-w-05 {
  432. border-right-width: 1rpx;
  433. }
  434. .border-b-w-05 {
  435. border-bottom-width: 1rpx;
  436. }
  437. .border-l-w-05 {
  438. border-left-width: 1rpx;
  439. }
  440. //borders 1px to 20px
  441. @for $i from 1 through 20 {
  442. $size: $i * 2rpx;
  443. /* all borders */
  444. .border-w-#{$i} {
  445. border-width: $size;
  446. }
  447. /* border top */
  448. .border-t-w-#{$i} {
  449. border-top-width: $size;
  450. }
  451. /* border right */
  452. .border-r-w-#{$i} {
  453. border-right-width: $size;
  454. }
  455. /* border bottom */
  456. .border-b-w-#{$i} {
  457. border-bottom-width: $size;
  458. }
  459. /* border left */
  460. .border-l-w-#{$i} {
  461. border-left-width: $size;
  462. }
  463. }
  464. /* Border Styles */
  465. .border-solid {
  466. border-style: solid;
  467. }
  468. .border-dashed {
  469. border-style: dashed;
  470. }
  471. .border-dotted {
  472. border-style: dotted;
  473. }
  474. .border-double {
  475. border-style: double;
  476. }
  477. .border-none {
  478. border-style: none;
  479. }
  480. /* Border Directions */
  481. .border {
  482. border-style: solid;
  483. border-width: 1rpx;
  484. }
  485. .border-t {
  486. border-top-style: solid;
  487. border-top-width: 1rpx;
  488. }
  489. .border-r {
  490. border-right-style: solid;
  491. border-right-width: 1rpx;
  492. }
  493. .border-b {
  494. border-bottom-style: solid;
  495. border-bottom-width: 1rpx;
  496. }
  497. .border-l {
  498. border-left-style: solid;
  499. border-left-width: 1rpx;
  500. }
  501. /* Clear Border Directions */
  502. .border-t-0 {
  503. border-top-width: 0;
  504. }
  505. .border-r-0 {
  506. border-right-width: 0;
  507. }
  508. .border-b-0 {
  509. border-bottom-width: 0;
  510. }
  511. .border-l-0 {
  512. border-left-width: 0;
  513. }
  514. .border-0 {
  515. border-width: 0;
  516. }
  517. // 定义颜色列表
  518. $colors: (
  519. '000000', '333333', '666666', '999999', 'CCCCCC', 'FFFFFF',
  520. 'FF0000', '00FF00', '0000FF', 'FFFF00', 'FF00FF', '00FFFF',
  521. 'FFA500', '800080', 'FFC0CB', 'A52A2A', '808080', 'D3D3D3',
  522. 'F5F5F5', 'FAFAFA', 'F8F9FA', 'E9ECEF', 'DEE2E6', 'CED4DA',
  523. 'ADB5BD', '6C757D', '495057', '343A40', '212529', '007BFF',
  524. '0069D9', '0056B3', '004085', '002752', '28A745', '218838',
  525. '1E7E34', '155724', '0F3D1F', 'DC3545', 'C82333', 'BD2130',
  526. 'A71E2A', '6E001D', 'FFC107', 'E0A800', 'D39E00', 'B8860B',
  527. '6C5600', '17A2B8', '138496', '117A8B', '0C5460', '062B36',
  528. 'F5F7FA', 'EEEEEE', '02B176', 'FA341E', 'D46C0D', 'FFA599',
  529. 'FF4B33', '38D97D', 'C39760', 'ED4B17', 'F9B71B', 'FFE600',
  530. 'FFF4E8'
  531. );
  532. // 文字颜色类 - 标准化格式
  533. @each $hex in $colors {
  534. .text-#{$hex} {
  535. color: unquote('#')#{$hex};
  536. }
  537. }
  538. // 背景颜色类
  539. @each $hex in $colors {
  540. .bg-#{$hex} {
  541. background-color: unquote('#')#{$hex};
  542. }
  543. }
  544. // 边框颜色类
  545. @each $hex in $colors {
  546. .border-#{$hex} {
  547. border-color: unquote('#')#{$hex};
  548. }
  549. }
  550. /* 主题色彩快捷类 */
  551. .text-blue {
  552. color: #007bff;
  553. }
  554. .text-green {
  555. color: #28a745;
  556. }
  557. .text-red {
  558. color: #dc3545;
  559. }
  560. .text-yellow {
  561. color: #ffc107;
  562. }
  563. .text-cyan {
  564. color: #17a2b8;
  565. }
  566. .text-gray {
  567. color: #f8f9fa;
  568. }
  569. .text-black {
  570. color: #000000;
  571. }
  572. .text-white {
  573. color: #ffffff;
  574. }
  575. .bg-blue {
  576. background-color: #007bff;
  577. }
  578. .bg-green {
  579. background-color: #28a745;
  580. }
  581. .bg-red {
  582. background-color: #dc3545;
  583. }
  584. .bg-yellow {
  585. background-color: #ffc107;
  586. }
  587. .bg-cyan {
  588. background-color: #17a2b8;
  589. }
  590. .bg-gray {
  591. background-color: #f8f9fa;
  592. }
  593. .bg-black {
  594. background-color: #000000;
  595. }
  596. .bg-white {
  597. background-color: #ffffff;
  598. }
  599. .bg-img{
  600. background-color: rgba(0, 0, 0, 0.1);
  601. transition: opacity 0.3s ease-in-out;// 图片加载过渡效果
  602. }
  603. /* 透明度类 */
  604. @for $i from 1 through 9 {
  605. .opacity-#{$i} {
  606. opacity: $i * 0.1;
  607. }
  608. }
  609. .opacity-0 {
  610. opacity: 0;
  611. }
  612. .opacity-10 {
  613. opacity: 1;
  614. }