javascript - 在移动 chrome 中滚动闪烁动画
问题描述
我正在尝试在我的网站中添加滚动动画。我使用动画 css并滚动出 js。我的 javascript 是,
<script>
ScrollOut({
targets: '.aos',
onShown: function(el) {
// remove the class
el.classList.remove("animated", "fadeIn");
// force reflow
void el.offsetWidth;
// re-add the animated cl
el.classList.add("animated", "fadeIn");
}
});
</script>
我<div class="aos animated fadeIn slow"></div>
在页面中使用。
然后它也适用于所有 dektop broswers 和移动 Firefox,但它只在移动 chrome 中提供动画前闪烁。我试图添加style="-webkit-transform: translate3d(0,0,0);"
到 div 元素,但没有工作。
解决方案
推荐阅读
- alexa - 使用相同帐户在 echo dot 中工作时无法在智能手机中调用 alexa 技能
- java - 如何在while循环中获取前一个数字并将其加倍?爪哇
- javascript - JavaScript 事件侦听器的函数在嵌套循环之外不起作用
- azure - 如何在 Azure 应用服务部署中安装浏览器
- javascript - 如何使用winston和passport session记录消息
- python - 使用 python 和 BeautifulSoup 进行网页抓取
- c - 字符串文字和 const 字符串文字有什么区别
- python - 如何使系统实现第二次读取RFID卡以进行注销?
- maven - Maven - 外部存储库问题
- css - 我的 css 动画代码运行不顺畅