对IE这个奇怪的兼容模式很无奈,也不知道运作机制是什么。本来是为了让那些IE6-only的网站能正常显示,但是实际上和IE6的渲染方式又略有不同,真是不知道该怎么去兼容了……
1
loading Apr 26, 2011
dtd定义到标准模式
|
2
chone Apr 26, 2011
<!DOCTYPE html>
|
3
xi4oh4o Apr 26, 2011
写meta
|
5
cmonday OP @chone
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 这样不对吗? |
7
loading Apr 26, 2011
|
11
cmonday OP @chone 是的,页面在我的IETester IE8模式下是没有问题的,但是boss跟我说他用的IE8下显示有问题,我看了半天发现他用了兼容模式……
|
15
est Apr 26, 2011
|
16
ilexswam Apr 26, 2011
<!DOCTYPE html> 可以保证 IE6+ 不以怪异模式(类似 IE5.x 吧)渲染。
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1" /> 可以保证 IE8+ 不以 IE7 模式渲染,并在 Chrome Frame 存在的情况下以 Chrome 渲染。 |