基于320px屏幕用css给ipad做适配

2021-07-09 10:49:41 浏览数 (2)

代码语言:javascript复制
@media screen and (width: 768px) and (orientation: portrait) {
    body{
        width:320px;
        -moz-transform: scale(2.4);
        -webkit-transform: scale(2.4);
        -o-transform: scale(2.4);
        -ms-transform: scale(2.4);
        transform: scale(2.4); 
        transform-origin: top center;
        -webkit-transform-origin: top center;
        -moz-transform-origin: top center;
        -ms-transform-origin: top center;
        -o-transform-origin: top center;
    }
}
@media screen and (max-device-width: 1024px) and (orientation: landscape) {
    body{
        width:320px;
        -moz-transform: scale(3.2);
        -webkit-transform: scale(3.2);
        -o-transform: scale(3.2);
        -ms-transform: scale(3.2);
        transform: scale(3.2);
        transform-origin: top center;
        -webkit-transform-origin: top center;
        -moz-transform-origin: top center;
        -ms-transform-origin: top center;
        -o-transform-origin: top center;
    }
}
@media screen and (max-width:640px){
    
}

0 人点赞