detail.css 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. transition: transform 0.2s;
  36. }
  37. .tag-button:hover {
  38. transform: scale(1.1);
  39. color: #ff4081;
  40. }
  41. .description {
  42. flex: 1 1 65%;
  43. max-width: 65%;
  44. }
  45. .button-wrapper {
  46. display: flex;
  47. flex-wrap: wrap;
  48. justify-content: start;
  49. align-items: center;
  50. }
  51. .play-button {
  52. display: inline-block;
  53. flex: 1 0 auto; /* 允许伸缩,不收缩,基础尺寸自适应 */
  54. min-width: max-content; /* 最小宽度由内容决定 */
  55. white-space: nowrap; /* 禁止按钮文字换行 */
  56. margin-top: 20px;
  57. margin-right: 20px;
  58. padding: 10px 20px;
  59. background-color: #ff4081;
  60. color: white;
  61. text-align: center;
  62. text-decoration: none;
  63. border-radius: 4px;
  64. font-weight: bold;
  65. border: none;
  66. cursor: pointer;
  67. transition: transform 0.2s;
  68. }
  69. .play-button:hover {
  70. transform: translateY(-5px);
  71. opacity: 0.75;
  72. }
  73. /* 媒体查询:当屏幕宽度小于768px时(移动端) */
  74. @media (max-width: 768px) {
  75. .poster, .description {
  76. flex: 1 1 100%;
  77. max-width: 100%;
  78. margin-bottom: 20px;
  79. }
  80. .description {
  81. margin-bottom: 0;
  82. }
  83. .play-button {
  84. width: 90%;
  85. text-align: center;
  86. }
  87. }