index.scss 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. // 全局样式文件:src/styles/index.scss
  2. // 1. 全局变量(可统一管理颜色、字体、间距等)
  3. $primary-color: #2D71FF; // 主色调(和 Element Plus 主色一致)
  4. $secondary-color: #667eea; // 辅助色
  5. $text-color: #333333; // 主要文字色
  6. $text-light-color: #666666; // 次要文字色
  7. $border-color: #eeeeee; // 边框色
  8. $bg-color: #f9f9f9; // 背景色
  9. $danger-color: #e63946; // 危险色(价格、警告等)
  10. .el-button--primary {
  11. &:not(.is-plain) {
  12. background-color: $primary-color;
  13. border-color: $primary-color;
  14. }
  15. &.is-plain {
  16. // color: $primary-color;
  17. border:none;
  18. // background-color: #ffffff;
  19. }
  20. }
  21. .container-height {
  22. min-height: calc(100vh - 60px);
  23. margin-bottom: 140px;
  24. }
  25. // 2. 全局重置样式(统一浏览器默认样式)
  26. * {
  27. box-sizing: border-box;
  28. font-family: PingFang SC, PingFang SC;
  29. }
  30. H1,
  31. H2,
  32. H3,
  33. H4,
  34. H5,
  35. H6,
  36. P {
  37. margin: 0;
  38. }
  39. body ,htm{
  40. font-family: "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  41. color: $text-color;
  42. background-color: #f5f5f5;
  43. line-height: 1.6;
  44. margin: 0;
  45. }
  46. body{
  47. background: url('@/assets/imgs/bg.png') no-repeat center center fixed;
  48. background-size: 100% 100%;
  49. }
  50. // 3. 公共样式类(全局可复用)
  51. // 容器宽度限制(统一页面最大宽度,居中显示)
  52. .container {
  53. max-width: 1520px;
  54. width: 80%;
  55. min-width: 1200px;
  56. margin: 0 auto;
  57. padding: 20px;
  58. }
  59. .gradient{
  60. background: linear-gradient( 90deg, #0055FE 0%, #C832FA 100%);
  61. }
  62. // 清除浮动
  63. .clearfix::after {
  64. content: "";
  65. display: block;
  66. clear: both;
  67. }
  68. // 禁用选中
  69. .no-select {
  70. user-select: none;
  71. -webkit-user-select: none;
  72. }
  73. // 调整折叠面板样式
  74. .el-collapse-item__header {
  75. background-color: $bg-color;
  76. }
  77. // 5. 响应式相关样式(全局通用)
  78. // 小屏幕(手机)
  79. @media (max-width: 768px) {
  80. .container {
  81. // padding: 0 10px;
  82. }
  83. }
  84. // 中屏幕(平板)
  85. @media (min-width: 769px) and (max-width: 1024px) {
  86. .container {
  87. // padding: 0 15px;
  88. }
  89. }
  90. @charset "UTF-8";
  91. wx-image{
  92. height: auto;
  93. }
  94. .padding8 {
  95. padding: 8px
  96. }
  97. .padding12 {
  98. padding: 12px
  99. }
  100. .padding16 {
  101. padding: 16px
  102. }
  103. .padding20 {
  104. padding: 20px
  105. }
  106. .paddingTB20 {
  107. padding: 20px 0
  108. }
  109. .paddingTB30 {
  110. padding: 30px 0
  111. }
  112. .paddingTB10 {
  113. padding: 10px 0
  114. }
  115. .pad20 {
  116. padding: 0 20px
  117. }
  118. .padding15 {
  119. padding: 15px
  120. }
  121. .padding30 {
  122. padding: 30px
  123. }
  124. .pad30 {
  125. padding: 0 30px
  126. }
  127. .pt20 {
  128. padding-top: 20px
  129. }
  130. .pb15 {
  131. padding-bottom: 15px
  132. }
  133. .pb20 {
  134. padding-bottom: 20px
  135. }
  136. .pb30 {
  137. padding-bottom: 30px
  138. }
  139. .mb30 {
  140. margin-bottom: 30px;
  141. }
  142. .mr10 {
  143. margin-right: 10px;
  144. }
  145. .mr20 {
  146. margin-right: 20px;
  147. }
  148. .mr30 {
  149. margin-right: 30px;
  150. }
  151. .mr10 {
  152. margin-right: 10px;
  153. }
  154. .ml5 {
  155. margin-left: 5px;
  156. }
  157. .ml10 {
  158. margin-left: 10px;
  159. }
  160. .ml20 {
  161. margin-left: 20px;
  162. }
  163. .mt2 {
  164. margin-top: 2px;
  165. }
  166. .mt16 {
  167. margin-top: 16px;
  168. }
  169. .mt20 {
  170. margin-top: 20px;
  171. }
  172. .mt30 {
  173. margin-top: 30px;
  174. }
  175. .mt16 {
  176. margin-top: 16px;
  177. }
  178. .mt10 {
  179. margin-top: 10px;
  180. }
  181. .mt5 {
  182. margin-top: 5px;
  183. }
  184. .mb20 {
  185. margin-bottom: 20px;
  186. }
  187. .mb10 {
  188. margin-bottom: 10px;
  189. }
  190. .ellipsis {
  191. overflow: hidden;
  192. text-overflow: ellipsis;
  193. white-space: nowrap
  194. }
  195. .line1 {
  196. word-break: break-all;
  197. display: -webkit-box;
  198. -webkit-line-clamp: 1;
  199. -webkit-box-orient: vertical;
  200. overflow: hidden;
  201. /* height: 84px; */
  202. }
  203. .line2 {
  204. word-break: break-all;
  205. display: -webkit-box;
  206. -webkit-line-clamp: 2;
  207. -webkit-box-orient: vertical;
  208. overflow: hidden;
  209. /* height: 84px; */
  210. }
  211. .line3 {
  212. word-break: break-all;
  213. display: -webkit-box;
  214. -webkit-line-clamp: 3;
  215. -webkit-box-orient: vertical;
  216. overflow: hidden;
  217. /* height: 84px; */
  218. }
  219. .mask {
  220. position: fixed;
  221. top: 0;
  222. left: 0;
  223. right: 0;
  224. bottom: 0;
  225. background-color: #000;
  226. opacity: .5;
  227. z-index: 5
  228. }
  229. @keyframes load {
  230. from {
  231. transform: rotate(0)
  232. }
  233. to {
  234. transform: rotate(360deg)
  235. }
  236. }
  237. @-webkit-keyframes load {
  238. from {
  239. transform: rotate(0)
  240. }
  241. to {
  242. transform: rotate(360deg)
  243. }
  244. }
  245. .loadingpic {
  246. animation: load 3s linear 1s infinite;
  247. --webkit-animation: load 3s linear 1s infinite
  248. }
  249. .loading-list {
  250. animation: load linear 1s infinite;
  251. -webkit-animation: load linear 1s infinite;
  252. font-size: 40px;
  253. margin-right: 22px
  254. }
  255. .loading {
  256. width: 100%;
  257. height: 100px;
  258. line-height: 100px;
  259. align-items: center;
  260. justify-content: center;
  261. position: relative;
  262. text-align: center
  263. }
  264. .loading .line {
  265. position: absolute;
  266. width: 450px;
  267. left: 150px;
  268. top: 50px;
  269. height: 1px;
  270. border-top: 1px solid #eee
  271. }
  272. .loading .text {
  273. position: relative;
  274. display: inline-block;
  275. padding: 0 20px;
  276. background: #fff;
  277. z-index: 2;
  278. color: #777
  279. }
  280. .loadingicon .loading {
  281. animation: load linear 1s infinite;
  282. font-size: 45px;
  283. color: #000
  284. }
  285. .loadingicon {
  286. width: 100%;
  287. height: 80px;
  288. overflow: hidden
  289. }
  290. .bg-color-huic{
  291. background: #F1F1F1!important;
  292. border: 1px solid #ccc!important;
  293. color: #ccc!important;
  294. }
  295. .nowrap{
  296. white-space: nowrap;
  297. }
  298. .gap10{
  299. gap: 10px;
  300. }
  301. /*flex样式*/
  302. .flex_1{
  303. flex:1;
  304. }
  305. .flex{
  306. display: flex;
  307. }
  308. .flex_2{
  309. flex: 2;
  310. }
  311. .flex-between{/*两边对齐*/
  312. display: flex;
  313. justify-content: space-between;
  314. }
  315. .flex-align-center{/*垂直居中*/
  316. display: flex !important;
  317. align-items: center;
  318. }
  319. .flex-center{/*水平垂直居中*/
  320. display: flex;
  321. justify-content: center;
  322. align-items: center;
  323. }
  324. .flex-center-flex-end{/*水平垂直居中-尾部对齐*/
  325. display: flex;
  326. justify-content: flex-end;
  327. align-items: center;
  328. }
  329. .flex-center-box-end{/*水平垂直居中-铺满盒内*/
  330. display: -webkit-inline-box;
  331. justify-content: flex-end;
  332. align-items: center;
  333. }
  334. .flex-center-flex-start{/*水平垂直居中-首部对齐*/
  335. display: flex;
  336. justify-content: flex-start;
  337. align-items: center;
  338. }
  339. .flex-center-around{/*水平垂直居中-平均对齐*/
  340. display: flex;
  341. justify-content: space-around;
  342. align-items: center;
  343. }
  344. .flex-center-between{/*水平垂直居中-两边对齐*/
  345. display: flex;
  346. justify-content: space-between;
  347. align-items: center;
  348. }
  349. .flex-column{/*竖直方向*/
  350. display: flex;
  351. flex-direction: column;
  352. }
  353. .flex-column-center{/*竖直方向水平居中 两端对齐*/
  354. display: flex;
  355. flex-direction: column;
  356. justify-content: space-between;
  357. align-items: center;
  358. }
  359. .flex-column-start{/*竖直方向水平居中 首部对齐*/
  360. display: flex;
  361. flex-direction: column;
  362. justify-content: space-around;
  363. align-items: self-start;
  364. }
  365. .flex-column-start-between{/*竖直方向-首部对齐-两端对齐*/
  366. display: flex;
  367. flex-direction: column;
  368. justify-content: space-between;
  369. align-items: self-start;
  370. }
  371. .flex-column-align{/*竖直方向水平居中*/
  372. display: flex;
  373. flex-direction: column;
  374. align-items: center;
  375. }
  376. .flex-center-flex-start-warp{/*水平垂直居中-首部对齐*/
  377. display: flex;
  378. justify-content: flex-start;
  379. align-items: center;
  380. flex-wrap:wrap ;
  381. }
  382. .gap5{
  383. //水平垂直居中-首部对齐 间隙10px
  384. display: flex;
  385. justify-content: flex-start;
  386. align-items: center;
  387. gap: 5px;
  388. flex-wrap:wrap ;
  389. }
  390. .gap10{
  391. //水平垂直居中-首部对齐 间隙10px
  392. display: flex;
  393. justify-content: flex-start;
  394. align-items: center;
  395. gap: 10px;
  396. flex-wrap:wrap ;
  397. }
  398. .gap20{
  399. //水平垂直居中-首部对齐 间隙10px
  400. display: flex;
  401. justify-content: flex-start;
  402. align-items: center;
  403. gap: 20px;
  404. flex-wrap:wrap ;
  405. }
  406. //课程网格布局
  407. .course-grid {
  408. display: grid;
  409. grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  410. gap: 20px;
  411. }
  412. .order_btn{
  413. font-size: 25px;
  414. color: #ffffff;
  415. border-radius:10px;
  416. background-color: $primary-color;
  417. &.error{
  418. background-color: #E93323;
  419. }
  420. &.plain{
  421. border:1px solid #cccccc;
  422. color: #000000;
  423. background-color: #ffffff;
  424. }
  425. }
  426. .border{
  427. border: 1px solid #eeeeee;
  428. }
  429. .border-bottom{
  430. border-bottom: 1px solid #eeeeee;
  431. }
  432. .gray{
  433. color: #666666;
  434. }
  435. .gray999{
  436. color: #999999;
  437. }
  438. .link{
  439. color: #007aff;
  440. }
  441. .bg_color_f5{
  442. background-color: #f5f5f5;
  443. }
  444. .edit_gary {
  445. background: #EBEBEB;
  446. }
  447. .bg_color_fff{
  448. background-color: #ffffff;
  449. }
  450. .bg_color_primary{
  451. background-color: $primary-color;
  452. }
  453. .bg_gradient_primary{
  454. background: linear-gradient(180deg, #0089FF 0%, #F5F7FA 50%);
  455. background-size: 200% 100vh;
  456. background-repeat: no-repeat;
  457. }
  458. .bg_gradient_primary_toright{
  459. //从左到右渐变色
  460. background: linear-gradient(to right, rgba(73, 171, 255, 1), rgba(0, 137, 255, 1));
  461. }
  462. .border_radius_10{
  463. border-radius: 10px;
  464. }
  465. .border_radius_16{
  466. border-radius: 16px;
  467. }
  468. .border_radius_20{
  469. border-radius: 20px;
  470. }
  471. .border_radius_30{
  472. border-radius: 30px;
  473. }
  474. .bold{
  475. font-weight: bold;
  476. }
  477. .font_weight400{
  478. font-weight: 400;
  479. }
  480. .font_size40{
  481. font-size: 40px;
  482. }
  483. .font_size36{
  484. font-size: 36px;
  485. }
  486. .font_size35{
  487. font-size: 35px;
  488. }
  489. .font_size32{
  490. font-size: 32px;
  491. }
  492. .font_size30{
  493. font-size: 30px;
  494. }
  495. .font_size28{
  496. font-size: 28px;
  497. }
  498. .font_size20{
  499. font-size: 20px;
  500. }
  501. .font_size25{
  502. font-size: 25px;
  503. }
  504. .font_size24{
  505. font-size: 24px;
  506. }
  507. .font_size18{
  508. font-size: 18px;
  509. }
  510. .font_size14{
  511. font-size: 14px;
  512. }
  513. .font_size13{
  514. font-size: 13px;
  515. }
  516. .line_height22{
  517. line-height: 22px;
  518. }
  519. .line_vertical{
  520. width: 6px;
  521. height: 24px;
  522. background-color: $primary-color;
  523. border-radius: 4px;
  524. }
  525. .color_price{
  526. color: #E43434;
  527. }
  528. .color_vip{
  529. color: #fee189;
  530. }
  531. .color_fff{
  532. color: #ffffff;
  533. }
  534. .color_000{
  535. color: #000000;
  536. }
  537. .color_theme{
  538. color: $primary-color;
  539. }
  540. .text_align_center{
  541. text-align: center;
  542. }
  543. .text_align_right{
  544. text-align: right;
  545. }
  546. .foot{
  547. padding: 20px 30px;
  548. width: 100%;
  549. position: fixed;
  550. bottom: 0;
  551. left: 0;
  552. box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  553. z-index: 10;
  554. }
  555. .box_shadow{
  556. box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  557. }
  558. .ellipsis{
  559. overflow: hidden;
  560. white-space: nowrap;
  561. text-overflow: ellipsis;
  562. }
  563. .bg_img{
  564. width: 100%;
  565. position: absolute;
  566. top: 0;
  567. left: 0;;
  568. z-index: -1;
  569. }
  570. .line_through{
  571. text-decoration: line-through;
  572. }
  573. .required{
  574. color: #E93323;
  575. }
  576. .u_popup_bottom{
  577. border-radius: 30px 30px 0 0;
  578. }
  579. .overflow_hidden{
  580. overflow: hidden;
  581. }
  582. .noData{
  583. text-align: center;
  584. padding: 30px 0;
  585. color: #c8c7cc;
  586. }