/* scss中可以用mixin来扩展 */ @mixin ellipsis($line: 1) { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: $line; -webkit-box-orient: vertical; } @media screen and (min-width: 768px) { .main { .container { &.our-brand { .content { .item { position: relative; width: 286px; height: 286px; float: left; background-color: #ddd; &:first-child { width: 592px; height: 592px; .active { .title { font-size: 52px; } .subtitle { font-size: 34px; margin-top: 12px; } .link { width: 244px; height: 72px; margin-top: 150px; font-size: 42px; line-height: 72px; } } } img { display: block; width: 100%; height: 100%; } &:hover { .active { opacity: 1; } } .active { opacity: 0; position: absolute; left: 0; top: 0; z-index: 2; width: 100%; height: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; background-color: rgba(0, 0, 0, 0.5); -webkit-transition: opacity 0.4s; transition: opacity 0.4s; .title { font-size: 25px; color: #fff; } .subtitle { font-size: 20px; color: #fff; margin-top: 8px; font-weight: lighter; } .line { display: none; width: 40px; height: 1px; margin: 32px 0 60px; background-color: #fff; } .link { width: 142px; height: 40px; font-size: 24px; margin-top: 60px; border: 1px solid #ffffff; text-align: center; line-height: 40px; color: #fff; cursor: pointer; font-weight: lighter; } } } } } &.brand-activity { .content { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; .item { position: relative; width: 280px; height: 600px; overflow: hidden; -ms-flex-negative: 0; flex-shrink: 0; -webkit-transition: all 0.4s; transition: all 0.4s; a { display: block; width: 100%; height: 100%; } img { position: absolute; top: 0; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%); display: block; width: 640px; height: 600px; } &.hover { width: 640px; } &:nth-child(1) { .cover { &::after { content: '01'; } } } &:nth-child(2) { .cover { &::after { content: '02'; } } } &:nth-child(3) { .cover { &::after { content: '03'; } } } .active { position: absolute; width: 100%; height: 280px; bottom: 0; left: 0; -webkit-box-sizing: border-box; box-sizing: border-box; padding-left: 24px; background: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.88)), to(rgba(0, 0, 0, 0))); background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0)); .title { margin-top: 206px; width: 232px; font-size: 29px; color: #fff; @include ellipsis(1); font-weight: lighter; } .line { width: 20px; height: 2px; margin-top: 16px; background-color: #fff; } .description { display: none; } &::after { position: absolute; content: '01'; background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(rgba(255, 255, 255, 0.2))); background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0.2)); -webkit-background-clip: text; color: transparent; font-size: 30px; left: 24px; bottom: 66px; } } .hover-active { position: absolute; width: 486px; height: 160px; padding-top: 30px; padding-left: 26px; -webkit-box-sizing: border-box; box-sizing: border-box; border-top-left-radius: 32px; right: 0; bottom: 0; // background: linear-gradient(166deg, #0688d2 25%, rgba(32, 155, 212, 0.8)); background: rgb(243, 146, 13, 0.8); -webkit-transition: opacity 0.4s; transition: opacity 0.4s; .title { font-size: 40px; color: #fff; width: 300px; font-weight: bold; @include ellipsis(1); } .line { width: 38px; height: 4px; margin: 16px 0; background-color: #fff; } .description { text-align: justify; width: 300px; font-size: 20px; color: #fff; line-height: 1.5; @include ellipsis(1); } &::after { position: absolute; content: '01'; background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(rgba(255, 255, 255, 0.2))); background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0.2)); -webkit-background-clip: text; color: transparent; font-size: 90px; line-height: 90px; right: 32px; bottom: 24px; } } } } } &.company-values { .content { .item { position: relative; float: left; height: 340px; width: 390px; margin-right: 15px; margin-bottom: 15px; -webkit-box-sizing: border-box; box-sizing: border-box; overflow: hidden; .cover-bg { width: 100%; height: 100%; opacity: 1; -webkit-transition: all 0.4s; transition: all 0.4s; background: #f3920d; } img { width: 100%; height: 100%; opacity: 1; -webkit-transition: all 0.4s; transition: all 0.4s; } &.no-mb { margin-bottom: 0; } &.no-mr { margin-right: 0; } &:nth-child(1), &:nth-child(7) { width: 795px; } &:hover { img { -webkit-transform: scale(1.2); transform: scale(1.2); } } &:nth-child(2), &:nth-child(3), &:nth-child(7) { .cover { background: transparent; } &:hover { border: 1px solid #f3920d; img { opacity: 0; } .cover-bg { opacity: 0; } .subtitle, .title { color: #f3920d; } .line { &::before, &::after { background-color: #f3920d; } } } } .cover { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-align: center; -ms-flex-align: center; align-items: center; background: rgba(0, 0, 0, 0.5); .line { width: 180px; position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%) rotateZ(-45deg); transform: translate(-50%, -50%) rotateZ(-45deg); &::after, &::before { position: absolute; left: 0; top: 0; content: ''; display: block; width: 20px; height: 1px; background-color: #fff; } &::before { right: 0; left: unset; } } .title { color: #fff; font-size: 24px; } .subtitle { font-size: 18px; color: #fff; margin-top: 12px; &.en { text-transform: uppercase; } } } } } } &.friendly_link { .content { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; -webkit-box-align: center; -ms-flex-align: center; align-items: center; .item { position: relative; width: 232px; height: 100px; -webkit-box-sizing: border-box; box-sizing: border-box; border: 1px solid #d8d8d8; overflow: hidden; margin-right: 10px; margin-bottom: 10px; &:nth-child(5n) { margin-right: 0; } img { display: block; width: 100%; position: absolute; left: 0; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); } } } /* .content { width: 100%; overflow: hidden; .row { display: -webkit-box; display: -ms-flexbox; display: flex; &:last-child { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; -webkit-animation: 20s rowup-right linear infinite normal; animation: 20s rowup-right linear infinite normal; margin-top: 10px; } &:first-child { -webkit-animation: 20s rowup-left linear infinite normal; animation: 20s rowup-left linear infinite normal; } } .item { -ms-flex-negative: 0; flex-shrink: 0; position: relative; width: 232px; height: 100px; -webkit-box-sizing: border-box; box-sizing: border-box; border: 1px solid #d8d8d8; overflow: hidden; margin-right: 10px; &:last-child { margin-right: 0; } img { display: block; width: 100%; position: absolute; left: 0; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); } } } */ } } } } @media screen and (max-width: 768px) { .main { .container { &.our-brand { .content { width: 10.72rem; margin: 0 0.32rem; .item { position: relative; width: 2.5rem; height: 2.5rem; float: left; background-color: #ddd; margin-left: 0.24rem; margin-bottom: 0.24rem; &:first-child { width: 5.24rem; height: 5.24rem; margin-left: 0; } img { display: block; width: 100%; height: 100%; } .active { position: absolute; left: 0; top: 0; z-index: 2; width: 100%; height: 100%; .title { position: absolute; bottom: 0; left: 0; font-size: 0.26rem; color: #fff; width: 100%; line-height: 0.64rem; text-align: center; background: rgba(0, 0, 0, 0.39); } .subtitle { display: none; } .link { opacity: 0; display: block; width: 100%; height: 100%; position: absolute; z-index: 1; left: 0; top: 0; } } } } } &.brand-activity { margin-left: 0; margin-right: 0; width: auto; .content { .item { position: relative; width: 5.24rem; height: 4.91rem; overflow: hidden; display: inline-block; margin-right: 0.24rem; &:first-child { margin-left: 0.32rem; } &:last-child { margin-right: 0.32rem; } a { display: block; width: 100%; height: 100%; } img { display: block; width: 100%; height: 100%; } &:nth-child(1) { .cover { &::after { content: '01'; } } } &:nth-child(2) { .cover { &::after { content: '02'; } } } &:nth-child(3) { .cover { &::after { content: '03'; } } } .cover { position: absolute; width: 4.31rem; height: 1.29rem; padding-top: 0.24rem; padding-left: 0.32rem; -webkit-box-sizing: border-box; box-sizing: border-box; border-top-left-radius: 0.32rem; right: 0; bottom: 0; background: linear-gradient(166deg, #f3920d 25%, rgba(243, 146, 13, 0.8)); -webkit-transition: opacity 0.4s; transition: opacity 0.4s; .title { font-size: 0.3rem; color: #fff; width: 3.31rem; @include ellipsis(1); } .line { width: 0.16rem; height: 0.02rem; margin: 0.07rem 0; background-color: #fff; } .description { text-align: justify; width: 3.31rem; font-size: 0.24rem; color: #fff; line-height: 1.5; @include ellipsis(1); } &::after { position: absolute; content: '01'; background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(rgba(255, 255, 255, 0.2))); background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0.2)); -webkit-background-clip: text; color: transparent; font-size: 0.72rem; right: 0.24rem; bottom: 0.24rem; } } } } } &.company-values { width: 6.86rem; margin: 0 auto; .content { .item { position: relative; float: left; height: 1.94rem; width: 2.22rem; margin-right: 0.09rem; margin-bottom: 0.09rem; -webkit-box-sizing: border-box; box-sizing: border-box; overflow: hidden; img { width: 100%; height: 100%; opacity: 1; -webkit-transition: all 0.4s; transition: all 0.4s; } &.no-mb { margin-bottom: 0; } &.no-mr { margin-right: 0; } &:nth-child(1), &:nth-child(7) { width: 4.54rem; } &:nth-child(2), &:nth-child(3), &:nth-child(7) { .cover { background: transparent; } } .cover-bg { width: 100%; height: 100%; opacity: 1; -webkit-transition: all 0.4s; transition: all 0.4s; background: #f3920d; } .cover { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-align: center; -ms-flex-align: center; align-items: center; background: rgba(0, 0, 0, 0.5); .line { width: 1.9rem; position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%) rotateZ(-45deg); transform: translate(-50%, -50%) rotateZ(-45deg); &::after, &::before { position: absolute; left: 0; top: 0; content: ''; display: block; width: 0.2rem; height: 0.01rem; background-color: #fff; } &::before { right: 0; left: unset; } } .title { color: #fff; font-size: 0.24rem; } .subtitle { font-size: 0.2rem; color: #fff; margin-top: 0.1rem; &.en { text-transform: uppercase; } } } } } } &.head_quarter { width: 6.86rem; margin: 0 auto; .content { img { width: 100%; } } } &.friendly_link { width: 6.86rem; margin: 0 auto; .content { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; -webkit-box-align: center; -ms-flex-align: center; align-items: center; .item { position: relative; width: 2.2rem; height: 0.948rem; -webkit-box-sizing: border-box; box-sizing: border-box; border: 0.01rem solid #d8d8d8; overflow: hidden; margin-right: 0.13rem; margin-bottom: 0.13rem; &:nth-child(3n) { margin-right: 0; } img { display: block; width: 100%; position: absolute; left: 0; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); } } } } } } }