Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H5 相关 #9

Open
emilyzfive opened this issue May 8, 2021 · 0 comments
Open

H5 相关 #9

emilyzfive opened this issue May 8, 2021 · 0 comments

Comments

@emilyzfive
Copy link
Owner

emilyzfive commented May 8, 2021

h5 与原生通信机制

  1. 事件注册到全局变量
  2. 定义 scheme,app 自定义协议,H5 发起协议请求,app 拦截请求并处理

300ms 点击延迟

300ms 由来:区别双击缩放
解决方案:

  1. meta 标签添加属性禁用缩放
<meta name="viewport" content="user-scalable=no">
<meta name="viewport" content="initial-scale=1,maximum-scale=1">
  1. touch-action: none;
  2. fast-click:检测到 touch 事件时,通过 dom 去模拟一个自定义 click 事件

视频自动播放

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant