Web前端开发 同时用transform;和animate,滑动时会闪一下;该如何解决

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Web前端开发 同时用transform;和animate,滑动时会闪一下;该如何解决相关的知识,希望对你有一定的参考价值。

同时用transform;和animate,滑动时会闪一下;该如何解决 var setContainerOffset = function (pixel, animate)
container.removeClass('animate');
if (animate)
container.addClass('animate');

return container.css('transform', "translateX(" + pixel + "px)");
;

参考技术A 加一下在动画前stop(true,true)。本回答被提问者采纳

css 笔记:前端开发中的“居中”,绝对定位,transform和flex布局:相对绝对定位 - 1

/* center by traditional relative/absolute position */
/* parent */
.box.box_centerByAbsolute {
 position: relative;
}

/* child */
.box.box_centerByAbsolute .content {
 position: absolute;
 top: 50%;
 left: 50%;
 margin-left: -90px; /* box 的宽度是 180px */
 margin-top: -50px; /* box 的高度是 100px */
}

以上是关于Web前端开发 同时用transform;和animate,滑动时会闪一下;该如何解决的主要内容,如果未能解决你的问题,请参考以下文章

web前端工具哪个好用

前端开发常用css动画代码(自己收藏用)

css 笔记:前端开发中的“居中”,绝对定位,transform和flex布局:5。 CSS中的transform属性

阿里Weex,用Web方式开发Native应用

前端怎么做立体div

html 笔记:前端开发中的“居中”,绝对定位,transform和flex布局:1。 HTML结构