html - 微信 meta name="viewport" 兼容问题
巴扎黑
巴扎黑 2017-04-17 13:06:07
0
4
695

如上代码,使页面限制成640px宽度,但是在有的设备上是失效的,有的是高度好像没跟着缩小~
求解

巴扎黑
巴扎黑

모든 응답 (4)
阿神

这样设置,让其自适应

    巴扎黑
    var width; if(window.orientation===undefined){ width = screen.width; }else{ if(window.orientation==0){ width=Math.min(screen.width,screen.height); }else{ width=Math.max(screen.width,screen.height); } } var scale = width / 640; document.write('');
      Peter_Zhu


      最近新找到的解决方法,有效。但其兼容性还需要再测测,基本主流机型是没出现问题

        刘奇

        content=”width=device-width,让其自适应足矣,不知道为何要你那么做

          최신 다운로드
          더>
          웹 효과
          웹사이트 소스 코드
          웹사이트 자료
          프론트엔드 템플릿
          회사 소개 부인 성명 Sitemap
          PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!