index.module.less 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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-content {
  10. border-radius: 14px;
  11. background: linear-gradient(270deg, #DBF1FF 0%, #E7F9FF 100%) !important;
  12. // :global {
  13. // .n-card-cover {
  14. // border-radius: 14px !important;
  15. // }
  16. // }
  17. // 图片禁止拖动
  18. img {
  19. -moz-user-select: none;
  20. /* 火狐浏览器 */
  21. -webkit-user-drag: none;
  22. /* 谷歌、Safari和Opera浏览器 */
  23. -webkit-user-select: none;
  24. /* 谷歌、Safari和Opera浏览器 */
  25. -ms-user-select: none;
  26. /* IE10+浏览器 */
  27. user-select: none;
  28. /* 通用 */
  29. -webkit-touch-callout: none;
  30. /* iOS Safari */
  31. }
  32. }
  33. .card-section {
  34. position: relative;
  35. box-sizing: border-box;
  36. width: 300px;
  37. height: 220px;
  38. border-radius: 14px;
  39. background: linear-gradient(270deg, #DBF1FF 0%, #E7F9FF 100%) !important;
  40. display: inline-flex;
  41. transition: all .3s ease-in-out;
  42. &.cardDrag {
  43. cursor: move;
  44. :global {
  45. .n-image:not(.n-image--preview-disabled) {
  46. cursor: move !important;
  47. }
  48. }
  49. }
  50. &.course {
  51. cursor: pointer;
  52. }
  53. // 鼠标经过时样式
  54. &:hover,
  55. &.showAddBtn {
  56. transform: scale(1.01);
  57. transition: all .3s ease-in-out;
  58. .addBtn {
  59. display: block;
  60. opacity: 1;
  61. transition: all .3s ease-in-out;
  62. }
  63. }
  64. &.isActive {
  65. border: 2px solid rgba(0, 122, 254, 1) !important;
  66. }
  67. // 封面样式
  68. .cover {
  69. width: 100%;
  70. height: 100%;
  71. background-color: #fff;
  72. border-radius: 14px 14px 0 0;
  73. overflow: hidden;
  74. img {
  75. height: fit-content;
  76. min-height: 100%;
  77. }
  78. }
  79. :global {
  80. .n-card__footer {
  81. padding: 10px 12px;
  82. }
  83. .n-card-cover {
  84. // height: 170px;
  85. flex: 1 auto;
  86. }
  87. }
  88. .footer {
  89. display: flex;
  90. align-items: center;
  91. justify-content: space-between;
  92. padding: 3px 0;
  93. }
  94. .title {
  95. display: flex;
  96. align-items: center;
  97. .titleType {
  98. width: max(36px, 28Px);
  99. height: max(17px, 13Px);
  100. }
  101. .titleContent {
  102. padding-left: 6px;
  103. font-size: max(16px, 12Px);
  104. max-width: 160px;
  105. color: #131415;
  106. font-weight: 600 !important;
  107. flex: 1;
  108. }
  109. }
  110. // 收藏按钮
  111. .btnGroup {
  112. position: absolute;
  113. right: 12px;
  114. display: flex;
  115. align-items: center;
  116. :global {
  117. .n-spin-content {
  118. display: flex;
  119. align-items: center;
  120. }
  121. }
  122. }
  123. .btnItem+.btnItem {
  124. margin-left: 12px;
  125. }
  126. .iconCollect {
  127. width: 34px;
  128. height: 34px;
  129. // background: url('../../common/images/icon-collect-default.png') no-repeat center;
  130. // background-size: contain;
  131. // position: absolute;
  132. // right: 0;
  133. transition: transform .2s ease;
  134. &:hover {
  135. transform: scale(1.1);
  136. transition: transform .2s ease;
  137. }
  138. &.isCollect {
  139. cursor: pointer;
  140. }
  141. }
  142. .iconDiv {
  143. right: 12px;
  144. }
  145. // 精选
  146. .iconSelected {
  147. background: url('../../common/images/icon-selected.png') no-repeat center;
  148. background-size: contain;
  149. position: absolute;
  150. top: 0px;
  151. left: 0px;
  152. z-index: 9;
  153. width: 58px;
  154. height: 29px;
  155. border-top-left-radius: 14px;
  156. }
  157. // 添加
  158. .addBtn {
  159. position: absolute;
  160. top: 6px;
  161. right: 6px;
  162. font-size: max(16px, 12Px);
  163. font-weight: 600 !important;
  164. height: 32px;
  165. border-radius: 8px;
  166. // display: none;
  167. // opacity: 0;
  168. z-index: 99;
  169. transition: all .3s ease-in-out;
  170. &.addBtnDisabled {
  171. background-color: #fff;
  172. color: #999;
  173. font-weight: bold !important;
  174. --n-border: 1px solid #fff !important;
  175. --n-border-hover: 1px solid #fff !important;
  176. --n-border-pressed: 1px solid #fff !important;
  177. --n-border-focus: 1px solid #fff !important;
  178. --n-border-disabled: 1px solid #fff !important;
  179. --n-opacity-disabled: 1 !important;
  180. }
  181. }
  182. .offShelfBg {
  183. position: absolute;
  184. top: 0;
  185. left: 0;
  186. width: 100%;
  187. height: 100%;
  188. border-radius: 14px;
  189. background-color: rgba(0, 0, 0, 0.7);
  190. z-index: 10;
  191. display: flex;
  192. align-items: center;
  193. justify-content: center;
  194. flex-direction: column;
  195. .offShelfTips {
  196. font-size: 22px;
  197. font-weight: 600;
  198. color: #FFFFFF;
  199. line-height: 30px;
  200. padding-bottom: 32px;
  201. }
  202. .offShelfBtn {
  203. height: 44px;
  204. border-radius: 10px;
  205. min-width: 124px;
  206. }
  207. }
  208. }