2015-06-23 31 views
0

标题:CSS转换属性 - 结果不一致的IE9 & IE10CSS变换属性 - 在IE9和IE10结果不一致

在IE9 & IE10看,这一沼泽标准W3Schools的演示代码下面进行不一致。该问题是未能识别变换属性。

用本地存储在计算机上的文件打开时(即桌面)
在存储在共享驱动器上打开时失败, Web服务器,但直接访问(不通过http)
共享上的同一文件通过http引用打开时有效。

试图找出差异化因素。

<!DOCTYPE html> 
<html> 
<head> 
<style> 
div { 
    width: 200px; 
    height: 100px; 
    background-color: yellow; 
    /* Rotate div */ 
    -ms-transform: rotate(7deg); /* IE 9 */ 
    -webkit-transform: rotate(7deg); /* Chrome, Safari, Opera */ 
    transform: rotate(7deg); 
} 
</style> 
</head> 
<body> 

<div>Hello</div> 
<br> 

<p><b>Note:</b> Internet Explorer 8 and earlier versions do not support the transform property.</p> 
<p><b>Note:</b> Internet Explorer 9 supports an alternative, the -ms-transform property. Newer versions of IE support the transform property (do not need the ms prefix).</p> 
<p><b>Note:</b> Chrome, Safari and Opera supports an alternative, the -webkit-transform property.</p> 

</body> 
</html> 
+0

可以肯定的是,Chrome和Opera不再使用webkit。 – Rob

回答

0

它看起来像问题是浏览器在某些情况下切换到怪癖模式,并且修复了这个添加到顶部的头...

<meta http-equiv="x-ua-compatible" content="IE=Edge"/> 

我认为这仍然是有效的代码强制日期t标准模式。