index.scss 11 KB

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