|
@@ -1,65 +1,85 @@
|
|
|
.carousel-container {
|
|
|
- position: relative;
|
|
|
- width: 100%;
|
|
|
- max-width: 600px;
|
|
|
- overflow: hidden;
|
|
|
- }
|
|
|
-
|
|
|
- .carousel {
|
|
|
- display: flex;
|
|
|
- transition: transform 0.5s ease-in-out;
|
|
|
- }
|
|
|
-
|
|
|
- .slide {
|
|
|
- min-width: 100%;
|
|
|
- box-sizing: border-box;
|
|
|
- }
|
|
|
-
|
|
|
- .carousel-image {
|
|
|
- width: 100%;
|
|
|
- border-radius: 10px;
|
|
|
- object-fit: cover;
|
|
|
- }
|
|
|
-
|
|
|
- .prev, .next {
|
|
|
- position: absolute;
|
|
|
- top: 50%;
|
|
|
- transform: translateY(-50%);
|
|
|
- background-color: rgba(0, 0, 0, 0.5);
|
|
|
- color: white;
|
|
|
- border: none;
|
|
|
- font-size: 30px;
|
|
|
- padding: 10px;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
-
|
|
|
- .prev {
|
|
|
- left: 10px;
|
|
|
- }
|
|
|
-
|
|
|
- .next {
|
|
|
- right: 10px;
|
|
|
- }
|
|
|
-
|
|
|
- .dots {
|
|
|
- position: absolute;
|
|
|
- bottom: 10px;
|
|
|
- left: 50%;
|
|
|
- transform: translateX(-50%);
|
|
|
- display: flex;
|
|
|
- }
|
|
|
-
|
|
|
- .dot {
|
|
|
- height: 10px;
|
|
|
- width: 10px;
|
|
|
- margin: 0 5px;
|
|
|
- background-color: rgba(255, 255, 255, 0.7);
|
|
|
- border-radius: 50%;
|
|
|
- cursor: pointer;
|
|
|
- transition: background-color 0.3s;
|
|
|
- }
|
|
|
-
|
|
|
- .dot.active {
|
|
|
- background-color: white;
|
|
|
- }
|
|
|
-
|
|
|
+ position: relative;
|
|
|
+ width: 100%;
|
|
|
+ max-width: 600px;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.carousel {
|
|
|
+ display: flex;
|
|
|
+ transition: transform 0.5s ease-in-out;
|
|
|
+}
|
|
|
+
|
|
|
+.slide {
|
|
|
+ min-width: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.carousel-image {
|
|
|
+ width: 100%;
|
|
|
+ border-radius: 10px;
|
|
|
+ object-fit: cover;
|
|
|
+}
|
|
|
+
|
|
|
+.prev, .next {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ background-color: rgba(0, 0, 0, 0.5);
|
|
|
+ color: white;
|
|
|
+ border: none;
|
|
|
+ font-size: 30px;
|
|
|
+ padding: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.prev {
|
|
|
+ left: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.next {
|
|
|
+ right: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.dots {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 10px;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+
|
|
|
+.dot {
|
|
|
+ height: 10px;
|
|
|
+ width: 10px;
|
|
|
+ margin: 0 5px;
|
|
|
+ background-color: rgba(255, 255, 255, 0.7);
|
|
|
+ border-radius: 50%;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: background-color 0.3s;
|
|
|
+}
|
|
|
+
|
|
|
+.dot.active {
|
|
|
+ background-color: white;
|
|
|
+}
|
|
|
+
|
|
|
+/* 查看详情按钮样式 */
|
|
|
+.view-detail-button {
|
|
|
+ background-color: #1e88e5; /* 按钮背景色 */
|
|
|
+ color: white; /* 按钮文字颜色 */
|
|
|
+ border: none; /* 去掉边框 */
|
|
|
+ border-radius: 5px; /* 圆角 */
|
|
|
+ padding: 10px; /* 内边距 */
|
|
|
+ font-size: 16px; /* 字体大小 */
|
|
|
+ cursor: pointer; /* 鼠标指针样式 */
|
|
|
+ transition: background-color 0.3s; /* 背景色变化效果 */
|
|
|
+ width: 100%; /* 按钮宽度 */
|
|
|
+}
|
|
|
+
|
|
|
+.view-detail-button:hover {
|
|
|
+ background-color: #1565c0; /* 悬停时背景色 */
|
|
|
+}
|
|
|
+
|
|
|
+.view-detail-button:focus {
|
|
|
+ outline: none; /* 去掉聚焦时的轮廓 */
|
|
|
+}
|