@media screen and (min-width: 768px) { .main { .brand { margin-top: 60px; &:first-child { margin-top: 120px; } .container { position: relative; } .cover { width: 880px; height: 420px; background: pink; } .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; .brand-logo { position: relative; width: 174px; height: 106px; background: skyblue; overflow: hidden; img { display: block; position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } } .name { font-size: 16px; color: #505050; margin: 24px 0 32px; } .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; &:hover { background: #eee; } } } } } } @media screen and (max-width: 768px) { .main { .brand { width: 6.86rem; margin: 0 auto; margin-top: 0.4rem; &:first-child { margin-top: 0.8rem; } .cover { width: 100%; height: 3.28rem; img { display: block; width: 100%; height: 100%; } } .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; .brand-logo { position: relative; width: 1.48rem; height: 0.92rem; background: skyblue; overflow: hidden; img { display: block; position: absolute; left: 50%; top: 50%; height: 0.92rem; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } } .name { font-size: 0.26rem; color: #505050; } .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; &:hover { background: #eee; } } } } } }