case.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. @media screen and (min-width: 768px) {
  2. .title {
  3. font-size: 34px;
  4. text-align: center;
  5. margin-top: 100px;
  6. }
  7. .main {
  8. .case {
  9. -webkit-box-sizing: border-box;
  10. box-sizing: border-box;
  11. &:nth-child(1) {
  12. padding-top: 80px !important;
  13. }
  14. &:nth-child(odd) {
  15. height: 690px;
  16. padding: 120px 0;
  17. .cover {
  18. width: 668px;
  19. height: 410px;
  20. }
  21. }
  22. &: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. .cover {
  28. width: 568px;
  29. height: 397px;
  30. }
  31. }
  32. .cover {
  33. background: pink;
  34. }
  35. .content {
  36. position: relative;
  37. background: skyblue;
  38. width: 490px;
  39. height: 410px;
  40. margin-top: 50px;
  41. img {
  42. display: block;
  43. width: 580px;
  44. height: 516px;
  45. position: absolute;
  46. left: 50%;
  47. top: 50%;
  48. -webkit-transform: translate(-50%, -50%);
  49. transform: translate(-50%, -50%);
  50. }
  51. }
  52. .cover {
  53. img {
  54. display: block;
  55. width: 100%;
  56. height: 100%;
  57. }
  58. }
  59. }
  60. }
  61. .footer {
  62. margin-top: 0;
  63. }
  64. }
  65. @media screen and (max-width: 768px) {
  66. .title {
  67. font-size: 0.34rem;
  68. text-align: center;
  69. margin-top: 0.8rem;
  70. }
  71. .main {
  72. .case {
  73. -webkit-box-sizing: border-box;
  74. box-sizing: border-box;
  75. &:nth-child(1){
  76. margin-top: 0.8rem;
  77. }
  78. .content {
  79. position: relative;
  80. margin: 0 auto;
  81. width: 6.14rem;
  82. height: 3.77rem;
  83. float: unset !important;
  84. -webkit-transform: translateY(-28%);
  85. transform: translateY(-28%);
  86. img {
  87. display: block;
  88. width: 6.14rem;
  89. height: 3.77rem;
  90. position: absolute;
  91. left: 50%;
  92. top: 50%;
  93. -webkit-transform: translate(-50%, -50%);
  94. transform: translate(-50%, -50%);
  95. }
  96. }
  97. .cover {
  98. float: unset !important;
  99. margin: 0 auto;
  100. width: 6.14rem;
  101. height: 3.77rem;
  102. img {
  103. display: block;
  104. width: 100%;
  105. height: 100%;
  106. }
  107. }
  108. }
  109. }
  110. .footer {
  111. margin-top: 0;
  112. }
  113. }