gpt4 book ai didi

java - 将 doTranslate 转换为 rtl

转载 作者:太空宇宙 更新时间:2023-11-04 15:01:44 25 4
gpt4 key购买 nike

嗨,我需要帮助将此代码转换为 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)"

谢谢

最佳答案

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

关于java - 将 doTranslate 转换为 rtl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22494544/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com