detail.css 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .details {
  2. display: flex;
  3. flex-wrap: wrap;
  4. justify-content: space-between;
  5. align-items: flex-start;
  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. }
  18. .poster img {
  19. width: 100%;
  20. height: auto;
  21. object-fit: contain;
  22. aspect-ratio: 1;
  23. border-radius: 4px;
  24. }
  25. .tag-button {
  26. display: inline-block;
  27. text-align: center;
  28. text-decoration: none;
  29. background-color: #eee;
  30. margin: 2px;
  31. padding:5px 10px 5px 10px;
  32. color: #666;
  33. }
  34. .tag-button:hover {
  35. transform: scale(1.1);
  36. color: #ff4081;
  37. }
  38. .description {
  39. flex: 1 1 65%;
  40. max-width: 65%;
  41. }
  42. .button-wrapper {
  43. display: flex;
  44. justify-content: start;
  45. align-items: center;
  46. }
  47. .play-button {
  48. display: inline-block;
  49. margin-top: 20px;
  50. margin-right: 20px;
  51. padding: 10px 20px;
  52. background-color: #ff4081;
  53. color: white;
  54. text-align: center;
  55. text-decoration: none;
  56. border-radius: 4px;
  57. font-weight: bold;
  58. border: none;
  59. cursor: pointer;
  60. }
  61. /* 媒体查询:当屏幕宽度小于768px时(移动端) */
  62. @media (max-width: 768px) {
  63. .poster, .description {
  64. flex: 1 1 100%;
  65. max-width: 100%;
  66. margin-bottom: 20px;
  67. }
  68. .description {
  69. margin-bottom: 0;
  70. }
  71. .play-button {
  72. width: 90%;
  73. text-align: center;
  74. }
  75. }