在vue中配置rem
位置:在APP.vue的script中,在export default之外
(()=>{
let winW = document.documentElement.clientWidth,
desW = 1440,
htmlFont = winW / desW * 100;
window.htmlFont = htmlFont;
document.documentElement.style.fontSize = htmlFont + ‘px‘;
})()
浏览器的兼容性之Mate标签
在vue项目index.html中
是否启用WebApp全屏模式,删除苹果默认的工具栏
<mate name="apple-touch-fullscreen" content="yes" />
启用360极速模式
<mate name="renderer" content="webkit" />
针对老的手持设备优化,不识别viewport
<mate name="HandheldFriendly" content="true" />
uc强制竖屏
<mate name="screen-orientation" content="portrait" />
QQ强制竖屏
<mate name="x5-orientation" content="portrait" />
UC强制全屏
<mate name="full-screen" content="yes" />
qq强制全屏
<mate name="x5-fullscreen" content="true" />
UC应用模式
<mate name="browsermode" content="application" />
QQ应用模式
<mate name="x5-page-mode" content="app" />
windows phone 点击无高光
<mate name="msapplication-tap-highlight" content="no" />
不被显示为拨号连接
<mate name="format-detection" content="telephone=no" />
优先使用IE最新版本和chrome
<mate http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >
浏览器页面头像
<link rel="shortcut icon" href="图片路径" type="image/x-icon"/>
原文地址:https://www.cnblogs.com/MisterHe/p/10232310.html