index.scss 11 KB

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