首页 > 代码库 > viewport 640宽的做法 针对iphone和安卓单独设置
viewport 640宽的做法 针对iphone和安卓单独设置
<!DOCTYPE html><html lang="ch"><head><meta charset="utf-8" /><meta HTTP-EQUIV="pragma" CONTENT="no-cache"><meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate"><meta HTTP-EQUIV="expires" CONTENT="0"><meta name="apple-touch-fullscreen" content="yes" /><meta name="format-detection" content="telephone=no" /><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="apple-mobile-web-app-status-bar-style" content="black" /><meta http-equiv="Expires" content="-1" /><meta http-equiv="pragram" content="no-cache" /><base href="http://app.cntcma.com/"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>第二届京津冀协同发展论坛</title><meta name="sharecontent" data-msg-img=‘http://app.cntcma.com/attachments/image/20141113/20141113205001_32033.png‘ data-msg-title=‘第二届京津冀协同发展论坛‘ data-msg-content=‘敬请关注‘ data-msg-callBack=‘‘ data-line-img=‘http://app.cntcma.com/attachments/image/20141113/20141113205001_32033.png‘ data-line-title=‘第二届京津冀协同发展论坛‘ data-line-callBack=‘‘ /><script type="text/javascript">if(/Android (\d+\.\d+)/.test(navigator.userAgent)){ var version = parseFloat(RegExp.$1); if(version>2.3){ var phoneScale = parseInt(window.screen.width)/640; document.write(‘<meta name="viewport" content="width=640, minimum-scale = ‘+ phoneScale +‘, maximum-scale = ‘+ phoneScale +‘, target-densitydpi=device-dpi">‘); }else{ document.write(‘<meta name="viewport" content="width=640, target-densitydpi=device-dpi">‘); } }else{ document.write(‘<meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi">‘); }//微信去掉下方刷新栏 if(RegExp("MicroMessenger").test(navigator.userAgent)){ document.addEventListener(‘WeixinJSBridgeReady‘, function() { WeixinJSBridge.call(‘hideToolbar‘); }); } </script>
参考的页面:http://app.cntcma.com/wx/35f4a8d465e6e1edc05f3d8ab658c551.html
viewport 640宽的做法 针对iphone和安卓单独设置
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。