Javascript JQuery CSS转换在Chrome和Firefox中工作,但在IE中不工作

Javascript JQuery CSS转换在Chrome和Firefox中工作,但在IE中不工作,javascript,jquery,html,css,internet-explorer,Javascript,Jquery,Html,Css,Internet Explorer,我在一些选项卡下有一个指针图像,当单击时,指针图像会移向相应的选项卡。这可以在Chrome和Firefox中使用,但在IE中不起作用 小提琴在这里: 代码如下所示,其中: 表1 id=1 表2 id=2 表3 id=3 $('#1').click(function(){ $('#triangle-tab').css({ '-webkit-transform' : 'translateX(-330px)', '-moz-transform' : 'translateX(-330px

我在一些选项卡下有一个指针图像,当单击时,指针图像会移向相应的选项卡。这可以在Chrome和Firefox中使用,但在IE中不起作用

小提琴在这里:

代码如下所示,其中:

表1 id=1

表2 id=2

表3 id=3

$('#1').click(function(){
$('#triangle-tab').css({
    '-webkit-transform' : 'translateX(-330px)',
    '-moz-transform' : 'translateX(-330px)',
    '-ms-transform' : 'translateX(-330px)',
    'transform' : 'translateX(-330px)',
    '-webkit-transition-duration' : '.5s',
    '-moz-transition-duration' : '.5s',
    '-ms-transition-duration' : '.5s',
    'transition-duration' : '.5s'
});
});

$('#2').click(function(){
$('#triangle-tab').css({
    '-webkit-transform' : 'translateX(0px)',
    '-moz-transform' : 'translateX(0px)',
    '-ms-transform' : 'translateX(0px)',
    'transform' : 'translateX(0px)',
    '-webkit-transition-duration' : '.5s',
    '-moz-transition-duration' : '.5s',
    '-ms-transition-duration' : '.5s',
    'transition-duration' : '.5s'
});
});

$('#3').click(function(){
$('#triangle-tab').css({
    '-webkit-transform' : 'translateX(330px)',
    '-moz-transform' : 'translateX(330px)',
    '-ms-transform' : 'translateX(330px)',
    'transform' : 'translateX(330px)',
    '-webkit-transition-duration' : '.5s',
    '-moz-transition-duration' : '.5s',
    '-ms-transition-duration' : '.5s',
    'transition-duration' : '.5s'
});
});
使用此代码,我们可以得到以下代码:

        #transformedObject {
         width:             220px;
         height:            70px;

         -moz-transform:    translateX(-330px);
         -o-transform:      translateX(-330px);
         -webkit-transform: translateX(-330px);
         transform:         translateX(-330px);
    }   

    /*
     * 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=1, M12=0, M21=0, M22=1, SizingMethod='auto expand')";

       /* IE6 and 7 */ 
       filter: progid:DXImageTransform.Microsoft.Matrix(
                M11=1,
                M12=0,
                M21=0,
                M22=1,
                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: -387px; 
       margin-top: -3px;

    }

以上内容将使CSS3转换在IE中工作,我们可以根据需要对其进行调整。

关于您的
a:focus{outline:none;}
规则:哪个IE版本,在FIDDLE(IE11)上加载jquery似乎有问题。试试这个:检查浏览器兼容性。IE10及以上浏览器支持过渡持续时间