将doTranslate转换为rtl

时间:2014-03-19 01:34:24

标签: java javascript jquery arrays right-to-left

您好我需要帮助将此代码转换为RTl,或者我的意思是希望像素输出获得正面不负面

    doTranslate : function(pixels){
        return {
            "-webkit-transform": "translate3d("+pixels+"px, 0px, 0px)",
            "-moz-transform": "translate3d("+pixels+"px, 0px, 0px)",
            "-o-transform": "translate3d("+pixels+"px, 0px, 0px)",
            "-ms-transform": "translate3d("+pixels+"px, 0px, 0px)",
            "transform": "translate3d("+pixels+"px, 0px,0px)"

感谢名单

1 个答案:

答案 0 :(得分:0)

    doTranslate : function (pixels) {
        return {
            "-webkit-transform": "translate3d(" + -pixels + "px, 0px, 0px)",
            "-moz-transform": "translate3d(" + -pixels + "px, 0px, 0px)",
            "-o-transform": "translate3d(" + -pixels + "px, 0px, 0px)",
            "-ms-transform": "translate3d(" + -pixels + "px, 0px, 0px)",
            "transform": "translate3d(" + -pixels + "px, 0px,0px)"
        };