index.module.less 2.4 KB

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