Home  >  Article  >  Web Front-end  >  MVC发布网站后,客户端访问默认是兼容模式.80分求解决._html/css_WEB-ITnose

MVC发布网站后,客户端访问默认是兼容模式.80分求解决._html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:37:461089browse

MVC 发布一个网站.客户端访问后,IE版本默认会变成兼容模式. 怎么设置HTML 才能让客户端访问后 IE版本不跳兼容模式?


回复讨论(解决方案)

在head中加入下面代码

<meta name="renderer" content="webkit|ie-comp|ie-stand">

上面三个可以选择一个,也可以全写,用|分割。
其中webkit表示默认webkit内核,ie-comp表示默认ie兼容模式,ie-stand表示默认ie标准模式。

类似:
nbsp;html>
这一行前面不能有任何其它代码,有的话,可能直接进入兼容模式。
或者:
nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
查看csdn这个页面的源文件,这行代码前面不能有任何其它东西。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn