css 60fps指针事件 - http://www.thecssninja.com/css/pointer-events-60fps

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 60fps指针事件 - http://www.thecssninja.com/css/pointer-events-60fps相关的知识,希望对你有一定的参考价值。

/*
 *  All we have to do is add the .disable-hover class to the body when the user begins to scroll. 
 *  This then allows the users cursor to pass through the body and thus disable any hover effects.
*/
var body = document.body,
    timer;

window.addEventListener('scroll', function() {
  clearTimeout(timer);
  if(!body.classList.contains('disable-hover')) {
    body.classList.add('disable-hover')
  }
  
  timer = setTimeout(function(){
    body.classList.remove('disable-hover')
  },500);
}, false);
.disable-hover,
.disable-hover * {
  pointer-events: none !important;
}

以上是关于css 60fps指针事件 - http://www.thecssninja.com/css/pointer-events-60fps的主要内容,如果未能解决你的问题,请参考以下文章

#私藏项目实操分享# CSS3 实现“完全体”的 60 FPS 动画效果,CodeReview 同事直呼:细节!

Omi 拥抱 60FPS 的 Web 动画

在移动浏览器中以 60 FPS 的速度捕获视频

60 FPS 是啥意思在 Flutter 中如何一个屏幕每秒有 60 帧

使用 Core Graphics 以 30-60 fps 手动移动/旋转物体

使用 Camera2(Android 版本 21)API 录制 60fps 视频