在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"/>
