brand.css 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. @media screen and (min-width: 768px) {
  2. .main .brand {
  3. margin-top: 60px;
  4. }
  5. .main .brand:first-child {
  6. margin-top: 120px;
  7. }
  8. .main .brand .container {
  9. position: relative;
  10. }
  11. .main .brand .cover {
  12. width: 880px;
  13. height: 420px;
  14. background: pink;
  15. }
  16. .main .brand .content {
  17. position: absolute;
  18. right: 0;
  19. top: 50%;
  20. -webkit-transform: translateY(-50%);
  21. transform: translateY(-50%);
  22. display: -webkit-box;
  23. display: -ms-flexbox;
  24. display: flex;
  25. -webkit-box-pack: center;
  26. -ms-flex-pack: center;
  27. justify-content: center;
  28. -webkit-box-align: center;
  29. -ms-flex-align: center;
  30. align-items: center;
  31. -webkit-box-orient: vertical;
  32. -webkit-box-direction: normal;
  33. -ms-flex-direction: column;
  34. flex-direction: column;
  35. width: 360px;
  36. height: 340px;
  37. border: 3px solid #e8e8e8;
  38. -webkit-box-sizing: border-box;
  39. box-sizing: border-box;
  40. background: #fff;
  41. }
  42. .main .brand .content .brand-logo {
  43. position: relative;
  44. width: 174px;
  45. height: 106px;
  46. background: skyblue;
  47. overflow: hidden;
  48. }
  49. .main .brand .content .brand-logo img {
  50. display: block;
  51. position: absolute;
  52. left: 50%;
  53. top: 50%;
  54. -webkit-transform: translate(-50%, -50%);
  55. transform: translate(-50%, -50%);
  56. }
  57. .main .brand .content .name {
  58. font-size: 16px;
  59. color: #505050;
  60. margin: 24px 0 32px;
  61. }
  62. .main .brand .content .link {
  63. width: 160px;
  64. height: 48px;
  65. background: #f7f7f7;
  66. opacity: 1;
  67. font-size: 16px;
  68. color: #505050;
  69. text-align: center;
  70. line-height: 48px;
  71. cursor: pointer;
  72. -webkit-transition: all 0.4s;
  73. transition: all 0.4s;
  74. }
  75. .main .brand .content .link:hover {
  76. background: #eee;
  77. }
  78. }
  79. @media screen and (max-width: 768px) {
  80. .main .brand {
  81. width: 6.86rem;
  82. margin: 0 auto;
  83. margin-top: 0.4rem;
  84. }
  85. .main .brand:first-child {
  86. margin-top: 0.8rem;
  87. }
  88. .main .brand .cover {
  89. width: 100%;
  90. height: 3.28rem;
  91. }
  92. .main .brand .cover img {
  93. display: block;
  94. width: 100%;
  95. height: 100%;
  96. }
  97. .main .brand .content {
  98. position: relative;
  99. background: #fff;
  100. -webkit-box-sizing: border-box;
  101. box-sizing: border-box;
  102. border: 1px solid #e8e8e8;
  103. border-top: 0;
  104. padding: 0.32rem 0.4rem;
  105. }
  106. .main .brand .content .brand-logo {
  107. position: relative;
  108. width: 1.48rem;
  109. height: 0.92rem;
  110. background: skyblue;
  111. overflow: hidden;
  112. }
  113. .main .brand .content .brand-logo img {
  114. display: block;
  115. position: absolute;
  116. left: 50%;
  117. top: 50%;
  118. height: 0.92rem;
  119. -webkit-transform: translate(-50%, -50%);
  120. transform: translate(-50%, -50%);
  121. }
  122. .main .brand .content .name {
  123. font-size: 0.26rem;
  124. color: #505050;
  125. }
  126. .main .brand .content .link {
  127. position: absolute;
  128. right: 0.4rem;
  129. bottom: 0.32rem;
  130. width: 1.8rem;
  131. height: 0.56rem;
  132. background: #f7f7f7;
  133. opacity: 1;
  134. font-size: 0.24rem;
  135. color: #505050;
  136. text-align: center;
  137. line-height: 0.56rem;
  138. }
  139. .main .brand .content .link:hover {
  140. background: #eee;
  141. }
  142. }