Krishya | dbfadaa | 2025-06-09 20:33:15 +0800 | [diff] [blame] | 1 | /* 优化后的轮播样式 */ |
| 2 | .carousel-container { |
| 3 | display: flex; |
| 4 | margin-top: 20px; |
| 5 | margin-left: 2%; |
| 6 | margin-right: 2%; |
| 7 | } |
| 8 | |
| 9 | .carousel-section { |
| 10 | flex: 1; |
| 11 | } |
| 12 | |
| 13 | .carousel-section h2 { |
| 14 | font-size: 20px; |
| 15 | margin-bottom: 15px; |
| 16 | } |
| 17 | |
| 18 | .carousel { |
| 19 | position: relative; |
| 20 | background: linear-gradient(135deg, #e1cab2, #b68791); |
| 21 | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); |
| 22 | border-radius: 12px; |
| 23 | padding: 24px 48px; |
| 24 | color: #fff; |
| 25 | min-height: 220px; |
| 26 | display: flex; |
| 27 | align-items: center; |
| 28 | justify-content: center; |
| 29 | overflow: hidden; |
| 30 | } |
| 31 | |
| 32 | .promotion-name { |
| 33 | font-size: 24px; |
| 34 | font-weight: bold; |
| 35 | margin-top: 12px; |
| 36 | margin-bottom: 14px; |
| 37 | color: #135c69; |
| 38 | text-align: center; |
| 39 | } |
| 40 | |
| 41 | .carousel .arrow { |
| 42 | background: rgba(0, 0, 0, 0.3); |
| 43 | border: none; |
| 44 | color: #fff; |
| 45 | font-size: 24px; |
| 46 | width: 40px; |
| 47 | height: 40px; |
| 48 | border-radius: 50%; |
| 49 | cursor: pointer; |
| 50 | position: absolute; |
| 51 | top: 50%; |
| 52 | transform: translateY(-50%); |
| 53 | transition: background 0.3s; |
| 54 | z-index: 10; |
| 55 | } |
| 56 | |
| 57 | .carousel .arrow.left { |
| 58 | left: 16px; |
| 59 | } |
| 60 | |
| 61 | .carousel .arrow.right { |
| 62 | right: 16px; |
| 63 | } |
| 64 | |
| 65 | .carousel .arrow:hover { |
| 66 | background: rgba(0, 0, 0, 0.5); |
| 67 | } |
| 68 | |
| 69 | .carousel .slide { |
| 70 | width: 100%; |
| 71 | max-width: 720px; |
| 72 | text-align: left; |
| 73 | display: flex; |
| 74 | flex-direction: column; |
| 75 | gap: 10px; |
| 76 | line-height: 1.6; |
| 77 | } |
| 78 | |
| 79 | .carousel .slide strong { |
| 80 | font-weight: 600; |
| 81 | } |
| 82 | |
| 83 | .carousel .action-buttons { |
| 84 | display: flex; |
| 85 | gap: 12px; |
| 86 | margin-top: 12px; |
| 87 | } |
| 88 | |
| 89 | .carousel .action-buttons button { |
| 90 | padding: 6px 12px; |
| 91 | font-size: 14px; |
| 92 | border: none; |
| 93 | border-radius: 6px; |
| 94 | cursor: pointer; |
| 95 | transition: background-color 0.3s; |
| 96 | } |
| 97 | |
| 98 | .carousel .delete-btn { |
| 99 | background-color: #d9534f; |
| 100 | color: white; |
| 101 | } |
| 102 | |
| 103 | .carousel .delete-btn:hover { |
| 104 | background-color: #c9302c; |
| 105 | } |
| 106 | |
| 107 | .carousel .view-btn { |
| 108 | background-color: #5bc0de; |
| 109 | color: white; |
| 110 | } |
| 111 | |
| 112 | .carousel .view-btn:hover { |
| 113 | background-color: #31b0d5; |
| 114 | } |
| 115 | |
| 116 | /* 轮播指示器容器 */ |
| 117 | .carousel-indicators { |
| 118 | margin-top: 5%; |
| 119 | position: absolute; |
| 120 | bottom: 16px; /* 距离轮播底部的间距,可调整 */ |
| 121 | left: 50%; |
| 122 | transform: translateX(-50%); /* 水平居中 */ |
| 123 | display: flex; |
| 124 | align-items: center; |
| 125 | gap: 8px; /* 圆点间距 */ |
| 126 | z-index: 10; /* 确保在内容上层 */ |
| 127 | } |
| 128 | |
| 129 | /* 单个圆点 */ |
| 130 | .carousel-indicators .indicator { |
| 131 | width: 12px; |
| 132 | height: 12px; |
| 133 | border-radius: 50%; /* 圆形 */ |
| 134 | background-color: rgba(255, 255, 255, 0.4); /* 未选中状态颜色 */ |
| 135 | cursor: pointer; |
| 136 | transition: background-color 0.3s ease; /* 渐变过渡 */ |
| 137 | } |
| 138 | |
| 139 | /* 选中状态的圆点 */ |
| 140 | .carousel-indicators .indicator.active { |
| 141 | background-color: #fff; /* 选中时的高亮颜色 */ |
| 142 | } |
| 143 | |
| 144 | |
| 145 | /* 冷门资源专用 slide */ |
| 146 | .cold-slide { |
| 147 | display: flex; |
| 148 | gap: 10px; |
| 149 | align-items: center; |
| 150 | } |