移动端点击按钮为什么会有延迟反馈?

FSD-丽君 阅读 4

我在手机上做了一个按钮,点击后要切换状态,但总感觉点完要等一会儿才有反应,体验很差。我试过加 touch-action: manipulation,也用了 ontouchstart 代替 onclick,但还是有明显延迟。

这是我的关键代码:

<button ontouchstart="handleClick()" style="touch-action: manipulation;">点我</button>

是不是哪里没处理对?安卓和 iOS 都有这个问题。

我来解答 赞 2 收藏
二维码
手机扫码查看
暂无解答

暂无解答