_hero.css 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* resources/css/layout/_hero.css
  2. Hero 区域(封面图 + 叠加层 + 标题文字)。
  3. 来源:main.css 的 .hero-section、.hero-overlay、.hero-content 段落。
  4. */
  5. .hero-wrapper {
  6. position: relative;
  7. }
  8. .hero-section {
  9. height: 250px;
  10. width: 100%;
  11. background-size: cover;
  12. background-position: center;
  13. background-repeat: no-repeat;
  14. position: relative;
  15. display: flex;
  16. align-items: center;
  17. justify-content: center;
  18. }
  19. .hero-overlay {
  20. position: absolute;
  21. top: 0;
  22. left: 0;
  23. right: 0;
  24. bottom: 0;
  25. background: rgba(0, 0, 0, 0.2);
  26. }
  27. .hero-content {
  28. position: relative;
  29. z-index: 2;
  30. text-align: center;
  31. color: white;
  32. max-width: 600px;
  33. padding: 0 1rem;
  34. }
  35. .hero-title {
  36. font-size: 2.5rem;
  37. font-weight: bold;
  38. margin-bottom: 1rem;
  39. text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  40. }
  41. .hero-subtitle {
  42. font-size: 1.2rem;
  43. margin-bottom: 2rem;
  44. text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  45. }
  46. /* ── 响应式 ── */
  47. @media (max-width: 768px) {
  48. .hero-section {
  49. height: 250px;
  50. }
  51. .hero-title {
  52. font-size: 2rem;
  53. }
  54. .hero-subtitle {
  55. font-size: 1rem;
  56. }
  57. }
  58. @media (max-width: 576px) {
  59. .hero-title {
  60. font-size: 1.5rem;
  61. }
  62. .hero-subtitle {
  63. font-size: 0.9rem;
  64. }
  65. }