popular-designs.scss 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // 在文件末尾添加
  2. .liked {
  3. color: #ff6b6b; // 红色
  4. }
  5. // 阻止图标点击时的文本选中
  6. .work-stats span {
  7. user-select: none;
  8. }
  9. .work-stats span {
  10. transition: color 0.3s ease;
  11. }
  12. .popular-works {
  13. margin: 20px;
  14. }
  15. .section-title {
  16. font-size: 20px;
  17. font-weight: 700;
  18. margin-bottom: 15px;
  19. color: #333;
  20. position: relative;
  21. padding-left: 15px;
  22. &::before {
  23. content: '';
  24. position: absolute;
  25. left: 0;
  26. top: 50%;
  27. transform: translateY(-50%);
  28. width: 4px;
  29. height: 20px;
  30. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  31. border-radius: 2px;
  32. }
  33. }
  34. .works-grid {
  35. display: grid;
  36. grid-template-columns: repeat(2, 1fr);
  37. gap: 15px;
  38. }
  39. .work-item {
  40. background: #fff;
  41. border-radius: 15px;
  42. overflow: hidden;
  43. box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  44. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  45. cursor: pointer;
  46. &:hover {
  47. transform: translateY(-8px);
  48. box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  49. }
  50. }
  51. .work-image {
  52. height: 120px;
  53. position: relative;
  54. display: flex;
  55. align-items: center;
  56. justify-content: center;
  57. font-size: 36px;
  58. }
  59. .work-info {
  60. padding: 12px;
  61. }
  62. .work-title {
  63. font-size: 14px;
  64. font-weight: 600;
  65. margin-bottom: 4px;
  66. color: #333;
  67. }
  68. .work-stats {
  69. display: flex;
  70. justify-content: space-between;
  71. font-size: 12px;
  72. color: #666;
  73. span {
  74. cursor: pointer;
  75. transition: all 0.2s ease;
  76. &:hover {
  77. opacity: 0.8;
  78. }
  79. }
  80. }
  81. .liked {
  82. color: #ff6b6b;
  83. }