2014-03-19 65 views
1

嗨,我想幫助這個代碼轉換爲RTL或我的意思是想像素輸出獲得正不負轉換doTranslate到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)" 

感謝名單

回答

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)" 
     };