2012-11-26 41 views
6

可能重复:
CSS rotate property in IE文字旋转

可以在这里任何一个可以帮助对IE-8,IE -7版本旋转文本。 它正在丁目,火狐,IE-9,但不`吨对IE 8的任何结果,IE-7

<a href="#" class="beta_home">BETA</a> 

css 
a.beta_home{ 
    position: absolute; 
    text-decoration: none; 
    top: 12px; 
    right:0; 
    margin-left: 0px; 
    font-size: 9px; 
    color:red; 
    border: 1px solid #fff; 
    display: block; 
    -webkit-transform: rotate(-90deg); 
    -moz-transform: rotate(-90deg); 
    -ms-transform: rotate(-90deg); 
    -o-transform: rotate(-90deg); 
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); 
} 

回答

0
/* IE8+ - must be on one line, unfortunately */ 
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=-0.1763269807084645, M21=0, M22=1, SizingMethod='auto expand')"; 
/* IE6 and 7 */ 
filter: progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=-0.1763269807084645, M21=0, M22=1, SizingMethod='auto expand'); 

/* For IE6 and 7 */ 
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); 
5

我不会PREF做到这一点在任何浏览器因为他们都使其非常不同的..但你可以使用JavaScript

文档 http://code.google.com/p/jquery-rotate/

命令去做 $('#theimage')。rotateRight(45); $('#theimage')。rotateLeft();

这将使它同在IE 9,浏览器,Firefox,Opera和Safari导致使用它的画布对象,而不是通过浏览器渲染

将使用旧值编码为IE8打开文本,7 & 6生成它here

/* IE8+ - must be on one line, unfortunately */ 
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=-0.1763269807084645, M21=0, M22=1, SizingMethod='auto expand')"; 
/* IE6 and 7 */ 
filter: progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=-0.1763269807084645, M21=0, M22=1, SizingMethod='auto expand'); 

工作前

IE 7 & 8测试 Fiddle(利润需要在Chrome和其他浏览器不同的不能说为什么,但它确实)

如果你不知道如何不同的CSS槽出不同的浏览器看到这个link

我的意见

除了这一切,我会建议你作为一个图片(已经旋转)使用Photoshop或如果你没有访问此类程序使用免费(GIMP

+0

年纪较大的IE浏览器怎么样? – Raptor

+0

我将使用-ms-过滤器和过滤器:progid –

+0

只是从库页面读取,它支持IE7和IE8。尚未测试。 – Raptor

0

尝试使用此在线服务:

http://www.useragentman.com/IETransformsTranslator/

它变换CSS3规则应用于div

rotate(-90deg) 

WIDTH: 220px; HEIGHT: 70px;

IE浏览器的具体规则:

/* 
* The following two rules are for IE only and 
* should be wrapped in conditional comments. 
* The -ms-filter rule should be on one line 
* and always *before* the filter rule if 
* used in the same rule. 
*/ 

#transformedObject { 

    /* IE8+ - must be on one line, unfortunately */ 
    -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=3.061515884555943e-16, M12=1, M21=-1, M22=3.061515884555943e-16, SizingMethod='auto expand')"; 

    /* IE6 and 7 */ 
    filter: progid:DXImageTransform.Microsoft.Matrix(
      M11=3.061515884555943e-16, 
      M12=1, 
      M21=-1, 
      M22=3.061515884555943e-16, 
      SizingMethod='auto expand'); 


    /* 
    * To make the transform-origin be the middle of 
    * the object. Note: These numbers 
    * are approximations. For more accurate results, 
    * use Internet Explorer with this tool. 
    */ 
    margin-left: 71px; 
    margin-top: -78px; 

}