detail.css 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. border-radius: 4px;
  22. }
  23. .tag-button {
  24. display: inline-block;
  25. text-align: center;
  26. text-decoration: none;
  27. background-color: #eee;
  28. margin: 2px;
  29. padding:5px 10px 5px 10px;
  30. color: #666;
  31. }
  32. .tag-button:hover {
  33. transform: scale(1.1);
  34. color: #ff4081;
  35. }
  36. .description {
  37. flex: 1 1 65%;
  38. max-width: 65%;
  39. }
  40. .play-button {
  41. display: inline-block;
  42. margin-top: 20px;
  43. padding: 10px 20px;
  44. background-color: #ff4081;
  45. color: white;
  46. text-align: center;
  47. text-decoration: none;
  48. border-radius: 4px;
  49. font-weight: bold;
  50. }
  51. /* 媒体查询:当屏幕宽度小于768px时(移动端) */
  52. @media (max-width: 768px) {
  53. .poster, .description {
  54. flex: 1 1 100%;
  55. max-width: 100%;
  56. margin-bottom: 20px;
  57. }
  58. .description {
  59. margin-bottom: 0;
  60. }
  61. .play-button {
  62. width: 90%;
  63. text-align: center;
  64. }
  65. }