1

I am having trouble in my layout in IE9 compatibility View On . In all major browsers (including IE9 compatibility view off), the layout is fine. But it seems like textarea stays shrunk in IE9 and text inputs are shrunk. Below show the difference between the wanted layout in the other browsers and the incorrect layout in the IE9 compatibility view:

enter image description here

My question is simply how to fix the layout?

I have provided a jsfiddle to show the code: http://jsfiddle.net/U9Nm8/embedded/result/ (IN JSFiddle the layout looks fine)

4

1 回答 1

1

X-UA-Compatible只需添加带有值的HTTP 响应标头或元元素IE=edge即可防止用户切换到兼容性视图模式:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

兼容性视图模式不是为开发网站而设计的,您不应该关心您的标准兼容网站在 IE 中打开此模式时的外观。兼容性视图模式仅有助于查看为旧 IE 版本开发的旧站点,否则无法正常工作。

于 2013-02-03T00:35:16.620 回答