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