ios自适应问题---解决方案

1、首先需要配置视口viewport

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">

2、针对宽高比特殊处理

a.先用百分比自适应屏幕解决大部分通用屏幕显示问题

b.针对特殊宽高比屏幕用媒体选择器进行特殊处理

@media (max-height:535px){
    .bottom-img>img {
         width: 5rem;
    }
}

猜你喜欢

转载自blog.csdn.net/youngeffort/article/details/84138280