I'm using this jquery plugin to use CSS transforms with the jquery CSS function:
http://www.zachstronaut.com/posts/2009/02/22/jquery-patch-css-transform.html
$('.element').css{ transform : 'translate(' + val + 'px,0)' };
The above code currently works, but I would like to be able to increment the value, like you can do, for example, with margin left:
$('.element').css{ marginLeft : '+=' + val };
Is there a way to use jquery to increment the css3 transform / translate property?
Thanks!
您可以尝试添加css钩子进行translate
和使用
$('.element').css({ translate : '+=' + val });
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.