gpt4 book ai didi

android - Crosswalk Cordova - 单击延迟未由 ontouchstart 修复

转载 作者:行者123 更新时间:2023-11-28 08:45:39 25 4
gpt4 key购买 nike

基本上,我有一个写有 :active 的 CSS 按钮,但每次我点击手机上的按钮时,在切换到 Activity 阶段之前会有延迟。

CSS:

.btn {...} .btn:active{...}

然后我尝试使用 "touchstart""touchend" 添加和删除我的 Activity 类,但在正常 -> touchstart 和 touchstart -> 之间仍然存在延迟 ->触摸端。

J查询:

$(".btn").on("touchstart", function(){
$(this).addClass("touched");
}).on("touchend",function(){
$(this).removeClass("touched");
})

如何消除我的延迟?

最佳答案

原来我没有提供足够的信息。

问题似乎是 Chrome 的 bug,box-shadow。我删除了所有的 box-shadow 属性,它的效果非常好。

我希望这个答案可以留在这里供遇到同样问题的其他人使用。此外,如果您的元标记说明 width = device width 对于较新的 Chrome,则不需要 fastclick。

关于android - Crosswalk Cordova - 单击延迟未由 ontouchstart 修复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27598484/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com