index.scss 8.8 KB

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