2012-08-14 55 views
0

我需要在IE8中绘制一个倾斜的椭圆。在IE8中圈显示不正确

要显示边界半径用于PIE.js

要在其他浏览器显示用代码:

.levelConfidenceCircleBlue { 
    position: relative; 
    float: left; 
    width: 19px; 
    height: 18px; 
    background: none; 
    z-index: 10; 
    margin-top: -8px; 
    margin-left: 5px; 
    margin-right: 2px; 
} 

.levelConfidenceCircleBlue:before, 
.levelConfidenceCircleBlue:after { 
    position: absolute; 
    content: ""; 

    width: 15px; 
    height: 18px; 
    left: 0px; 
    background: #00A7E7; 
    -moz-border-radius: 50px/63px; 
    border-radius: 50px/63px; 
    -webkit-transform: rotate(26deg); 
     -moz-transform: rotate(26deg); 
     -ms-transform: rotate(26deg); 
     -o-transform: rotate(26deg); 
      transform: rotate(26deg); 
    -webkit-transform-origin: 0 100%; 
     -moz-transform-origin: 0 100%; 
     -ms-transform-origin: 0 100%; 
     -o-transform-origin: 0 100%; 
      transform-origin: 0 100%; 
} 

要调整为使用IE8劈:

<! - [if IE 8]> 
.levelConfidenceCircleBlue:before, 
.levelConfidenceCircleBlue:after { 
    position: absolute; 
    content: ""; 

    width: 15px; 
    height: 18px; 
    left: 0px; 

    background: none; 
    border-radius: 60px 40px 60px 40px; 
    -pie-background: #00A7E7; 
} 
<! [endif] -> 

没有改变。但是,如果将其更改为:

<! - [if IE 8]>  
.levelConfidenceCircleBlue { 
     position: relative; 
     float: left; 
     width: 19px; 
     height: 18px; 
     background: none; 
     z-index: 10; 
     margin-top: -8px; 
     margin-left: 5px; 
     margin-right: 2px; 
    } 

    .levelConfidenceCircleBlue:before, 
    .levelConfidenceCircleBlue:after { 
     position: absolute; 
     content: ""; 

     width: 15px; 
     height: 18px; 
     left: 0px; 

     background: none; 
     border-radius: 60px 40px 60px 40px; 
     -pie-background: #00A7E7; 
    } 
<! [endif] -> 

它显示正确的IE8在IE9 - 显示方块,在其他浏览器 - 不显示任何内容。 除了没有黑客的常规班/ * /和\ 0 /不起作用。

你能告诉我该如何解决这个问题吗?

回答

0

问题解决了。
该问题与PIE.js连接。

连接被改变为:

updatePIEButtons = function() { 
    if ($.browser.msie && $.browser.version == 8) { 


     $(".levelConfidenceCircleBlue").each(function() { 
       PIE.detach(this); 
       PIE.attach(this); 
      }); 
     } 
     else { 
      $("[other classes]").each(function() { 
       PIE.detach(this); 
       PIE.attach(this); 
      }); 
     } 
    }; 
0

您对IE的条件标记看起来不对。

<!--[if IE 8]> IE 8.0 <![endif]-->