index.scss 11 KB

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