index.scss 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. /* scss中可以用mixin来扩展 */
  2. @mixin ellipsis($line: 1) {
  3. overflow: hidden;
  4. text-overflow: ellipsis;
  5. display: -webkit-box;
  6. -webkit-line-clamp: $line;
  7. -webkit-box-orient: vertical;
  8. }
  9. // 轮播图
  10. .banner {
  11. width: 100%;
  12. height: 700px;
  13. img {
  14. display: block;
  15. height: 100%;
  16. }
  17. }
  18. .main {
  19. .container {
  20. margin-top: 120px;
  21. .section-title {
  22. margin-bottom: 80px;
  23. }
  24. &.our-brand {
  25. .content {
  26. .item {
  27. position: relative;
  28. width: 286px;
  29. height: 286px;
  30. float: left;
  31. background-color: #ddd;
  32. &:first-child {
  33. width: 592px;
  34. height: 592px;
  35. }
  36. img {
  37. display: block;
  38. width: 100%;
  39. height: 100%;
  40. }
  41. &:hover {
  42. .active {
  43. opacity: 1;
  44. }
  45. }
  46. .active {
  47. opacity: 0;
  48. position: absolute;
  49. left: 0;
  50. top: 0;
  51. z-index: 2;
  52. width: 100%;
  53. height: 100%;
  54. display: flex;
  55. justify-content: center;
  56. align-items: center;
  57. flex-direction: column;
  58. background-color: rgba(0, 0, 0, 0.5);
  59. transition: opacity 0.4s;
  60. .title {
  61. font-size: 34px;
  62. color: #fff;
  63. }
  64. .line {
  65. width: 40px;
  66. height: 1px;
  67. margin: 32px 0 60px;
  68. background-color: #fff;
  69. }
  70. .link {
  71. width: 160px;
  72. height: 48px;
  73. border: 1px solid #ffffff;
  74. text-align: center;
  75. line-height: 48px;
  76. color: #fff;
  77. cursor: pointer;
  78. }
  79. }
  80. }
  81. }
  82. }
  83. &.brand-activity {
  84. .content {
  85. display: flex;
  86. justify-content: center;
  87. .item {
  88. position: relative;
  89. width: 280px;
  90. height: 600px;
  91. overflow: hidden;
  92. flex-shrink: 0;
  93. transition: all 0.4s;
  94. a {
  95. display: block;
  96. width: 100%;
  97. height: 100%;
  98. }
  99. img {
  100. position: absolute;
  101. top: 0;
  102. left: 50%;
  103. transform: translateX(-50%);
  104. display: block;
  105. width: 640px;
  106. height: 600px;
  107. }
  108. &.hover {
  109. width: 640px;
  110. }
  111. &:nth-child(1) {
  112. .cover {
  113. &::after {
  114. content: '01';
  115. }
  116. }
  117. }
  118. &:nth-child(2) {
  119. .cover {
  120. &::after {
  121. content: '02';
  122. }
  123. }
  124. }
  125. &:nth-child(3) {
  126. .cover {
  127. &::after {
  128. content: '03';
  129. }
  130. }
  131. }
  132. .active {
  133. position: absolute;
  134. width: 100%;
  135. height: 280px;
  136. bottom: 0;
  137. left: 0;
  138. box-sizing: border-box;
  139. padding-left: 24px;
  140. background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0));
  141. .title {
  142. margin-top: 206px;
  143. width: 232px;
  144. font-size: 24px;
  145. color: #fff;
  146. @include ellipsis(1);
  147. }
  148. .line {
  149. width: 20px;
  150. height: 2px;
  151. margin-top: 16px;
  152. background-color: #fff;
  153. }
  154. .description {
  155. display: none;
  156. }
  157. &::after {
  158. position: absolute;
  159. content: '01';
  160. background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0.2));
  161. -webkit-background-clip: text;
  162. color: transparent;
  163. font-size: 30px;
  164. left: 24px;
  165. bottom: 66px;
  166. }
  167. }
  168. .hover-active {
  169. position: absolute;
  170. width: 486px;
  171. height: 160px;
  172. padding-top: 32px;
  173. padding-left: 32px;
  174. box-sizing: border-box;
  175. border-top-left-radius: 32px;
  176. right: 0;
  177. bottom: 0;
  178. background: linear-gradient(166deg, #0688d2 25%, rgba(32, 155, 212, 0.8));
  179. transition: opacity 0.4s;
  180. .title {
  181. font-size: 24px;
  182. color: #fff;
  183. width: 300px;
  184. @include ellipsis(1);
  185. }
  186. .line {
  187. width: 20px;
  188. height: 2px;
  189. margin: 16px 0 22px;
  190. background-color: #fff;
  191. }
  192. .description {
  193. text-align: justify;
  194. width: 300px;
  195. font-size: 16px;
  196. color: #fff;
  197. line-height: 1.5;
  198. @include ellipsis(2);
  199. }
  200. &::after {
  201. position: absolute;
  202. content: '01';
  203. background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0.2));
  204. -webkit-background-clip: text;
  205. color: transparent;
  206. font-size: 90px;
  207. line-height: 90px;
  208. right: 32px;
  209. bottom: 24px;
  210. }
  211. }
  212. }
  213. }
  214. }
  215. &.company-values {
  216. .content {
  217. .item {
  218. position: relative;
  219. float: left;
  220. height: 340px;
  221. width: 390px;
  222. margin-right: 15px;
  223. margin-bottom: 15px;
  224. box-sizing: border-box;
  225. overflow: hidden;
  226. img {
  227. width: 100%;
  228. height: 100%;
  229. opacity: 1;
  230. transition: all 0.4s;
  231. }
  232. &.no-mb {
  233. margin-bottom: 0;
  234. }
  235. &.no-mr {
  236. margin-right: 0;
  237. }
  238. &:nth-child(1),
  239. &:nth-child(7) {
  240. width: 795px;
  241. }
  242. &:hover {
  243. img {
  244. transform: scale(1.2);
  245. }
  246. }
  247. &:nth-child(2),
  248. &:nth-child(3),
  249. &:nth-child(7) {
  250. .cover {
  251. background: transparent;
  252. }
  253. &:hover {
  254. border: 1px solid #0688d2;
  255. img {
  256. opacity: 0;
  257. }
  258. .subtitle,
  259. .title {
  260. color: #0688d2;
  261. }
  262. .line {
  263. &::before,
  264. &::after {
  265. background-color: #0688d2;
  266. }
  267. }
  268. }
  269. }
  270. .cover {
  271. position: absolute;
  272. left: 0;
  273. top: 0;
  274. width: 100%;
  275. height: 100%;
  276. display: flex;
  277. justify-content: center;
  278. flex-direction: column;
  279. align-items: center;
  280. background: rgba(0, 0, 0, 0.5);
  281. .line {
  282. width: 180px;
  283. position: absolute;
  284. left: 50%;
  285. top: 50%;
  286. transform: translate(-50%, -50%) rotateZ(-45deg);
  287. &::after,
  288. &::before {
  289. position: absolute;
  290. left: 0;
  291. top: 0;
  292. content: '';
  293. display: block;
  294. width: 20px;
  295. height: 1px;
  296. background-color: #fff;
  297. }
  298. &::before {
  299. right: 0;
  300. left: unset;
  301. }
  302. }
  303. .title {
  304. color: #fff;
  305. font-size: 24px;
  306. }
  307. .subtitle {
  308. font-size: 18px;
  309. color: #fff;
  310. margin-top: 12px;
  311. &.en {
  312. text-transform: uppercase;
  313. }
  314. }
  315. }
  316. }
  317. }
  318. }
  319. &.head_quarter {
  320. }
  321. &.friendly_link {
  322. .content {
  323. .item {
  324. float: left;
  325. position: relative;
  326. width: 230px;
  327. height: 100px;
  328. box-sizing: border-box;
  329. border: 1px solid #d8d8d8;
  330. overflow: hidden;
  331. margin-right: 12px;
  332. margin-top: 20px;
  333. &:nth-child(5n) {
  334. margin-right: 0;
  335. }
  336. &:nth-child(-n + 5) {
  337. margin-top: 0;
  338. }
  339. img {
  340. display: block;
  341. width: 100%;
  342. position: absolute;
  343. left: 0;
  344. top: 50%;
  345. transform: translateY(-50%);
  346. }
  347. }
  348. }
  349. }
  350. }
  351. }