@media screen and (min-width: 768px) { .main .brand { margin-top: 60px; } .main .brand:first-child { margin-top: 120px; } .main .brand .container { position: relative; } .main .brand .cover { width: 880px; height: 420px; background: pink; } .main .brand .content { position: absolute; right: 0; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); 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; width: 360px; height: 340px; border: 3px solid #e8e8e8; -webkit-box-sizing: border-box; box-sizing: border-box; background: #fff; } .main .brand .content .brand-logo { position: relative; width: 174px; height: 106px; background: skyblue; overflow: hidden; } .main .brand .content .brand-logo img { display: block; position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .main .brand .content .name { font-size: 16px; color: #505050; margin: 24px 0 32px; } .main .brand .content .link { width: 160px; height: 48px; background: #f7f7f7; opacity: 1; font-size: 16px; color: #505050; text-align: center; line-height: 48px; cursor: pointer; -webkit-transition: all 0.4s; transition: all 0.4s; } .main .brand .content .link:hover { background: #eee; } } @media screen and (max-width: 768px) { .main .brand { width: 6.86rem; margin: 0 auto; margin-top: 0.4rem; } .main .brand:first-child { margin-top: 0.8rem; } .main .brand .cover { width: 100%; height: 3.28rem; } .main .brand .cover img { display: block; width: 100%; height: 100%; } .main .brand .content { position: relative; background: #fff; -webkit-box-sizing: border-box; box-sizing: border-box; border: 1px solid #e8e8e8; border-top: 0; padding: 0.32rem 0.4rem; } .main .brand .content .brand-logo { position: relative; width: 1.48rem; height: 0.92rem; background: skyblue; overflow: hidden; } .main .brand .content .brand-logo img { display: block; position: absolute; left: 50%; top: 50%; height: 0.92rem; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .main .brand .content .name { font-size: 0.26rem; color: #505050; } .main .brand .content .link { position: absolute; right: 0.4rem; bottom: 0.32rem; width: 1.8rem; height: 0.56rem; background: #f7f7f7; opacity: 1; font-size: 0.24rem; color: #505050; text-align: center; line-height: 0.56rem; } .main .brand .content .link:hover { background: #eee; } }