case.css 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. @media screen and (min-width: 768px) {
  2. .title {
  3. font-size: 34px;
  4. text-align: center;
  5. margin-top: 100px;
  6. }
  7. .main .case {
  8. -webkit-box-sizing: border-box;
  9. box-sizing: border-box;
  10. }
  11. .main .case:nth-child(1) {
  12. padding-top: 80px !important;
  13. }
  14. .main .case:nth-child(odd) {
  15. height: 690px;
  16. padding: 120px 0;
  17. }
  18. .main .case:nth-child(odd) .cover {
  19. width: 668px;
  20. height: 410px;
  21. }
  22. .main .case:nth-child(even) {
  23. height: 720px;
  24. padding: 162px 0;
  25. background: url(/img/case-bg.png) no-repeat center;
  26. background-size: auto 720px;
  27. }
  28. .main .case:nth-child(even) .cover {
  29. width: 568px;
  30. height: 397px;
  31. }
  32. .main .case .cover {
  33. background: pink;
  34. }
  35. .main .case .content {
  36. position: relative;
  37. background: skyblue;
  38. width: 490px;
  39. height: 410px;
  40. margin-top: 50px;
  41. }
  42. .main .case .content img {
  43. display: block;
  44. width: 580px;
  45. height: 516px;
  46. position: absolute;
  47. left: 50%;
  48. top: 50%;
  49. -webkit-transform: translate(-50%, -50%);
  50. transform: translate(-50%, -50%);
  51. }
  52. .main .case .cover {
  53. position: relative;
  54. }
  55. .main .case .cover .cover-title {
  56. position: absolute;
  57. left: 0;
  58. top: 20%;
  59. font-size: 24px;
  60. color: #fff;
  61. background: #0688d2;
  62. padding: 0 20px;
  63. line-height: 48px;
  64. }
  65. .main .case .cover.fr .cover-title {
  66. top: 10%;
  67. left: -40px;
  68. }
  69. .main .case .cover img {
  70. display: block;
  71. width: 100%;
  72. height: 100%;
  73. }
  74. .footer {
  75. margin-top: 0;
  76. }
  77. }
  78. @media screen and (max-width: 768px) {
  79. .title {
  80. font-size: 0.34rem;
  81. text-align: center;
  82. margin-top: 0.8rem;
  83. }
  84. .main .case {
  85. -webkit-box-sizing: border-box;
  86. box-sizing: border-box;
  87. margin-top: 0.4rem;
  88. }
  89. .main .case .content {
  90. position: relative;
  91. margin: 0 auto;
  92. width: 6.14rem;
  93. float: unset !important;
  94. margin-top: -1.2rem;
  95. }
  96. .main .case .content img {
  97. display: block;
  98. width: 6.14rem;
  99. }
  100. .main .case .cover {
  101. position: relative;
  102. float: unset !important;
  103. margin: 0 auto;
  104. width: 6.14rem;
  105. text-align: center;
  106. }
  107. .main .case .cover .cover-title {
  108. font-size: 0.26rem;
  109. color: #fff;
  110. background: #0688d2;
  111. padding: 0 0.29rem;
  112. line-height: 0.56rem;
  113. display: inline-block;
  114. margin-bottom: 0.4rem;
  115. }
  116. .main .case .cover img {
  117. display: block;
  118. width: 100%;
  119. height: 100%;
  120. }
  121. .footer {
  122. margin-top: 0;
  123. }
  124. }