[英]Is fastclick js still needed?
I mean this: 我是说这个:
https://github.com/ftlabs/fastclick https://github.com/ftlabs/fastclick
Is it still needed and important? 它仍然需要和重要吗?
I know there are things related to viewport declarations concerning certain browsers. 我知道有些事情与某些浏览器的视口声明有关。 But It seems they are old things, and what about the other browsers nowadays?
但它似乎是旧事物,现在其他浏览器呢?
<meta name="viewport" content="width=device-width, initial-scale=1">
This article explains in detail why and when you need fastclick.js
: https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away 本文详细解释了为什么以及何时需要
fastclick.js
: https : //developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away
TL;DR TL; DR
As of Chrome 32 (back in 2014) this delay is gone for mobile-optimised sites, without removing pinch-zooming!
从Chrome 32开始(早在2014年),移动优化网站的延迟已经消失,而无需移除缩放! Firefox and IE/Edge did the same shortly afterwards, and in March 2016 a similar fix landed in iOS 9.3.
不久之后Firefox和IE / Edge也做了同样的事情,并且在2016年3月,一个类似的修复程序登陆了iOS 9.3。
As long as your <head>
includes: <meta name="viewport" content="width=device-width">
, this way the browser assumes you have made the text readable on mobile so there is no need for double-click. 只要您的
<head>
包含: <meta name="viewport" content="width=device-width">
,浏览器就会假定您已在移动设备上显示文本,因此无需双击。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.