如何添加一些代码以使我的translate3d effect也能在firefox.上工作jquery代码是:
if (st > lastScrollTop){
$('div#search-apartments #content-inner #search-box').attr('style', '-webkit-transform:translate3d(0, '+movepx+'px, 0)');
} else {
$('div#search-apartments #content-inner #search-box').attr('style', '-webkit-transform:translate3d(0, '+movepx+'px, 0)');
So how and where do I need to add the code for "-**moz**-transform:translate3d(0, '+movepx+'px, 0)"??
Thanks!发布于 2014-03-12 08:04:30
使用这段代码可以帮助您解决firefox的问题
$(‘div#搜索-公寓#内容-内部#搜索框’).attr(‘style’,‘-webkit-转换:translate3d(0,'+movepx+'px,0);-moz-transform:translate3d(0,'+movepx+'px,0)');
发布于 2014-03-12 08:16:29
使用此
if (st > lastScrollTop){
$('div#search-apartments #content-inner #search-box').css({'-webkit-transform':'translate3d(0, '+movepx+'px, 0)','-moz-transform:translate3d(0, '+movepx+'px, 0)'});
} else {
$('div#search-apartments #content-inner #search-box').css({'-webkit-transform':'translate3d(0, '+movepx+'px, 0)','-moz-transform:translate3d(0, '+movepx+'px, 0)'});
}发布于 2014-03-12 14:54:25
谢谢你们。
亚历克斯,你的不管用,但索海尔,你的效果很好。我刚刚扩展了您的IE和Opera解决方案,并以此为基础:
$('div#search-apartments #content-inner #search-box').attr('style', '-webkit-transform:translate3d(0, '+movepx+'px, 0);-moz-transform:translate3d(0, '+movepx+'px, 0);-ms-transform:translate3d(0, '+movepx+'px, 0);-o-transform:translate3d(0, '+movepx+'px, 0)');
再次,谢谢
https://stackoverflow.com/questions/22343812
复制相似问题