detail.css 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. .details {
  2. display: flex;
  3. flex-wrap: wrap;
  4. justify-content: space-between;
  5. align-items: center;
  6. margin: 20px auto;
  7. padding: 20px;
  8. max-width: 1200px;
  9. border: 1px solid #ccc;
  10. border-radius: 8px;
  11. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  12. }
  13. .poster {
  14. flex: 1 1 30%;
  15. max-width: 30%;
  16. margin-bottom: 20px;
  17. position: relative;
  18. display: inline-block;
  19. }
  20. .poster img {
  21. width: 100%;
  22. height: auto;
  23. object-fit: contain;
  24. aspect-ratio: 1;
  25. border-radius: 4px;
  26. }
  27. .tag-button {
  28. display: inline-block;
  29. text-align: center;
  30. text-decoration: none;
  31. background-color: #eee;
  32. margin: 2px;
  33. padding:5px 10px 5px 10px;
  34. color: #666;
  35. }
  36. .tag-button:hover {
  37. transform: scale(1.1);
  38. color: #ff4081;
  39. }
  40. .description {
  41. flex: 1 1 65%;
  42. max-width: 65%;
  43. }
  44. .button-wrapper {
  45. display: flex;
  46. flex-wrap: wrap;
  47. justify-content: start;
  48. align-items: center;
  49. }
  50. .play-button {
  51. display: inline-block;
  52. flex: 1 0 auto; /* 允许伸缩,不收缩,基础尺寸自适应 */
  53. min-width: max-content; /* 最小宽度由内容决定 */
  54. white-space: nowrap; /* 禁止按钮文字换行 */
  55. margin-top: 20px;
  56. margin-right: 20px;
  57. padding: 10px 20px;
  58. background-color: #ff4081;
  59. color: white;
  60. text-align: center;
  61. text-decoration: none;
  62. border-radius: 4px;
  63. font-weight: bold;
  64. border: none;
  65. cursor: pointer;
  66. transition: transform 0.2s;
  67. }
  68. .play-button:hover {
  69. transform: translateY(-5px);
  70. opacity: 0.75;
  71. }
  72. /* 媒体查询:当屏幕宽度小于768px时(移动端) */
  73. @media (max-width: 768px) {
  74. .poster, .description {
  75. flex: 1 1 100%;
  76. max-width: 100%;
  77. margin-bottom: 20px;
  78. }
  79. .description {
  80. margin-bottom: 0;
  81. }
  82. .play-button {
  83. width: 90%;
  84. text-align: center;
  85. }
  86. }