1.使用vw,vh,rem
@function vw($px) {
@return ($px / 1920) * 100vw;
}
@function vh($px) {
@return ($px / 1075) * 100vh;
}
@function rem($px) {
@return ($px / 100) * 1rem;
}
2.媒体查询
@media (max-width: 860px){
.choose-button {
position: relative;
width: 100%;
margin-bottom: 0;
.px2rem(height, 92);
}
}
.px2rem(@name, @px) {
@{name}: @px / 75 * 1rem;
}
© 著作权归作者所有
举报
发表评论
0/200