index.scss 11 KB

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