index.module.less 2.4 KB

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