work.css 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /* 首页页面 */
  2. @media (min-width: 768px) {
  3. .work-row {
  4. height: 800px;
  5. box-sizing: border-box;
  6. }
  7. }
  8. @media (min-width: 768px) {
  9. .row-two-col {
  10. height: 50%;
  11. overflow: hidden;
  12. }
  13. }
  14. @media (min-width: 768px) {
  15. .work-row-col {
  16. height: 100%;
  17. overflow: hidden;
  18. }
  19. }
  20. @media (min-width: 768px) {
  21. .col-two-row {
  22. height: 100%;
  23. }
  24. }
  25. .col-one-img {
  26. overflow: hidden;
  27. height: 100%;
  28. position: relative;
  29. }
  30. .col-one-img img {
  31. height: 100%;
  32. width: 100%;
  33. object-fit: cover;
  34. }
  35. @media (max-width: 767px) {
  36. .row-two-col {
  37. height: 300px;
  38. overflow: hidden;
  39. position: relative;
  40. }
  41. }
  42. .col-title {
  43. transition: all ease 1s;
  44. position: absolute;
  45. top: 0;
  46. left: 0;
  47. z-index: 999;
  48. opacity: 0;
  49. display: inline-block;
  50. width: 100%;
  51. height: 100%;
  52. background-color: rgba(4, 4, 4, 0);
  53. }
  54. .col-title a {
  55. transition: all ease 1s;
  56. position: absolute;
  57. top: 60%;
  58. display: inline-block;
  59. text-align: center;
  60. width: 100%;
  61. transform: translateY(-50%);
  62. color: var(--bs-body-bg);
  63. text-decoration: none;
  64. font-weight: bold;
  65. }
  66. .col-one-img img {
  67. transform: scale(1);
  68. transition: all ease 0.5s;
  69. }
  70. .col-img {
  71. height: 100%;
  72. }
  73. .col-one-img:hover .col-img img {
  74. transform: scale(1.1);
  75. transition: all ease 0.5s;
  76. }
  77. .col-one-img:hover .col-title {
  78. opacity: 100;
  79. transition: all ease 1s;
  80. background-color: rgba(4, 4, 4, 0.5);
  81. }
  82. .col-one-img:hover .col-title a {
  83. top: 50%;
  84. transition: all ease 1s;
  85. }
  86. /* 案例页面 */
  87. .work-img-box {
  88. overflow: hidden;
  89. }
  90. .work-col-box {
  91. height: 300px;
  92. overflow: hidden;
  93. }
  94. .work-img-box img {
  95. object-fit: cover;
  96. left: 50%;
  97. transform: translateX(-50%) scale(1);
  98. transition: all ease 0.5s;
  99. }
  100. .work-col-title {
  101. top: 55%;
  102. transform: translateY(-50%);
  103. transition: all ease 1s;
  104. }
  105. .work-col-title-box {
  106. background-color: rgba(4, 4, 4, 0.5);
  107. z-index: 9999;
  108. transition: all ease 1s;
  109. opacity: 0;
  110. }
  111. .work-col-box:hover .work-img-box img {
  112. left: 50%;
  113. transform: translateX(-50%) scale(1.1);
  114. transition: all ease .5s;
  115. }
  116. .work-col-box:hover .work-col-title {
  117. top: 50%;
  118. transition: all ease 1s;
  119. }
  120. .work-col-box:hover .work-col-title-box {
  121. opacity: 1;
  122. transition: all ease 1s;
  123. }
  124. @media (max-width: 767px) {
  125. .work-img {
  126. width: 100%;
  127. height: 100%;
  128. object-fit: cover;
  129. }
  130. }
  131. @media (min-width: 768px) {
  132. .work-img {
  133. height: 100%;
  134. width: auto;
  135. object-fit: cover;
  136. }
  137. }
  138. @media (min-width: 768px) {
  139. .work-row {
  140. height: 800px;
  141. box-sizing: border-box;
  142. }
  143. .work-one-col {
  144. height: 100%;
  145. width: 50%;
  146. }
  147. .work-two-col {
  148. height: 50%;
  149. width: 50%;
  150. }
  151. }
  152. .col-one-img {
  153. overflow: hidden;
  154. height: 100%;
  155. position: relative;
  156. }