banner.css 978 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. .carousel-container {
  2. position: relative;
  3. width: 60%; /* PC端宽度占60% */
  4. margin: auto;
  5. overflow: hidden;
  6. padding-top: 10px;
  7. z-index: 1;
  8. }
  9. .carousel-images {
  10. display: flex;
  11. transition: transform 0.5s ease-in-out;
  12. }
  13. .carousel-images .item {
  14. width: 100%;
  15. flex-shrink: 0;
  16. }
  17. .btn-prev, .btn-next {
  18. position: absolute;
  19. top: 50%;
  20. transform: translateY(-50%);
  21. background-color: rgba(0,0,0,0.5);
  22. color: white;
  23. border: none;
  24. padding: 10px;
  25. cursor: pointer;
  26. z-index: 2;
  27. }
  28. .btn-prev {
  29. left: 10px;
  30. }
  31. .btn-next {
  32. right: 10px;
  33. }
  34. .carousel-play-btn {
  35. display: inline-block;
  36. padding: 10px;
  37. background-color: #ff4081;
  38. color: white;
  39. text-align: center;
  40. text-decoration: none;
  41. border-radius: 4px;
  42. font-weight: bold;
  43. width: 90%;
  44. }
  45. /* 响应式设计, 如果是手机屏幕 */
  46. @media (max-width: 768px) {
  47. .carousel-container {
  48. width: 90%; /* 手机端宽度占90% */
  49. }
  50. .cat-description {
  51. display: none;
  52. }
  53. }