index.module.less 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. :global {
  2. .n-card--bordered {
  3. border: 2px solid rgba(202, 228, 244, 1) !important;
  4. &:hover {
  5. border: 2px solid rgba(0, 122, 254, 1) !important;
  6. }
  7. }
  8. }
  9. .card-section {
  10. position: relative;
  11. box-sizing: border-box;
  12. width: 300px;
  13. height: 220px;
  14. border-radius: 14px;
  15. background: linear-gradient(270deg, #DBF1FF 0%, #E7F9FF 100%) !important;
  16. display: inline-flex;
  17. transition: all .3s ease-in-out;
  18. &.course {
  19. cursor: pointer;
  20. }
  21. // 鼠标经过时样式
  22. &:hover {
  23. transform: scale(1.01);
  24. transition: all .3s ease-in-out;
  25. .addBtn {
  26. display: block;
  27. opacity: 1;
  28. transition: all .3s ease-in-out;
  29. }
  30. }
  31. &.isActive {
  32. border: 2px solid rgba(0, 122, 254, 1) !important;
  33. }
  34. // 封面样式
  35. .cover {
  36. width: 100%;
  37. height: 170px;
  38. background-color: #fff;
  39. border-radius: 14px 14px 0 0;
  40. overflow: hidden;
  41. img {
  42. height: fit-content;
  43. min-height: 100%;
  44. }
  45. }
  46. :global {
  47. .n-card__footer {
  48. padding: 10px 12px;
  49. }
  50. }
  51. .footer {
  52. display: flex;
  53. align-items: center;
  54. justify-content: space-between;
  55. }
  56. .title {
  57. display: flex;
  58. align-items: center;
  59. .titleType {
  60. width: 36px;
  61. height: 17px;
  62. }
  63. .titleContent {
  64. padding-left: 6px;
  65. font-size: 16px;
  66. max-width: 180px;
  67. color: #131415;
  68. font-weight: 600 !important;
  69. flex: 1;
  70. }
  71. }
  72. // 收藏按钮
  73. .iconCollect {
  74. width: 34px;
  75. height: 34px;
  76. // background: url('../../common/images/icon-collect-default.png') no-repeat center;
  77. // background-size: contain;
  78. position: absolute;
  79. right: 0;
  80. transition: transform .2s ease;
  81. &:hover {
  82. transform: scale(1.1);
  83. transition: transform .2s ease;
  84. }
  85. &.isCollect {
  86. cursor: pointer;
  87. }
  88. }
  89. .iconDiv {
  90. right: 12px;
  91. }
  92. // 精选
  93. .iconSelected {
  94. background: url('../../common/images/icon-selected.png') no-repeat center;
  95. background-size: contain;
  96. position: absolute;
  97. top: 0px;
  98. left: 0px;
  99. z-index: 9;
  100. width: 58px;
  101. height: 29px;
  102. border-top-left-radius: 13px;
  103. }
  104. // 添加
  105. .addBtn {
  106. position: absolute;
  107. top: 6px;
  108. right: 6px;
  109. font-size: 16px;
  110. font-weight: 600;
  111. height: 32px;
  112. border-radius: 8px;
  113. display: none;
  114. opacity: 0;
  115. z-index: 99;
  116. transition: all .3s ease-in-out;
  117. }
  118. }