最近做項目,用360瀏覽器訪問自己的本地網頁,發現都是默認在兼容模式下打開,做的淡入淡出輪播效果在兼容模式下看時,感覺切換很生硬。百度,發現360官網幫助里有說明用meta標簽控制瀏覽器內核,網址為http://se.360.cn/v6/help/meta.html.
實現方式很簡單,就是在head標簽中加上一個meta標簽:
<html>
<head>
<meta name="renderer" content="webkit|ie-comp|ie-stand">//三選一或三選二
</head>
<body>
</body>
</html>
content的取值為webkit,ie-comp,ie-stand之一,區分大小寫,分別代表用webkit內核,IE兼容內核,IE標准內核。
若頁面需默認用極速核,增加標簽:<meta name="renderer" content="webkit">
若頁面需默認用ie兼容內核,增加標簽:<meta name="renderer" content="ie-comp">
若頁面需默認用ie標准內核,增加標簽:<meta name="renderer" content="ie-stand">

