.carousel-container { position: relative; width: 60%; /* PC端宽度占60% */ margin: auto; overflow: hidden; padding-top: 10px; z-index: 1; } .carousel-images { display: flex; transition: transform 0.5s ease-in-out; } .carousel-images .item { width: 100%; flex-shrink: 0; } .btn-prev, .btn-next { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0,0,0,0.5); color: white; border: none; padding: 10px; cursor: pointer; z-index: 2; } .btn-prev { left: 10px; } .btn-next { right: 10px; } .carousel-play-btn { display: inline-block; padding: 10px; background-color: #ff4081; color: white; text-align: center; text-decoration: none; border-radius: 4px; font-weight: bold; width: 90%; } /* 响应式设计, 如果是手机屏幕 */ @media (max-width: 768px) { .carousel-container { width: 90%; /* 手机端宽度占90% */ } .cat-description { display: none; } }