如果我使用ZURB的基金会创建一个响应式网站,我是否需要包括像Fastclick这样的库(通过FTLabs)以避免触摸设备上的300毫秒点击延迟?
似乎图书馆应该包括这个,因为在移动设备上做好事情是其主要目的。
我想,当我考虑它时,似乎fastclick应该包含在每个需要在触摸设备上显示的网站上 - 或者不是......?
If I create a responsive website using ZURB's Foundation, will I need to include a library like Fastclick (by FTLabs) in order to avoid the 300 ms click delay on touch devices?
Seems the library should include this since getting things to act nice on mobile is its main purpose.
I guess, when I think about it, it seems that fastclick should be included on every single website that needs to be displayed on a touch device - or not...?
最满意答案
似乎旧的已接受的答案已不再有效。 Fastclick现在由Foundation使用。
在那里搜索“Fastclick”时,在Foundation Github repo上找到了这个:
(来自https://github.com/zurb/foundation/search?utf8=%E2%9C%93&q=fastclick )
另外,我在Foundation Github回购中找到了这个:
// Enable FastClick if present $(function () { if (typeof FastClick !== 'undefined') { // Don't attach to body if undefined if (typeof document.body !== 'undefined') { FastClick.attach(document.body); } } });(来源: https : //github.com/zurb/foundation/blob/d2c9a9a7e84e53e5eff41ac2f61a8425f0760086/js/foundation/foundation.js )
所以,这基本上意味着你可以根据需要使用Fastclick,而Foundation会为你初始化它,但你也可以决定排除你的libs和Fastclick不会被使用。
Seems like the old accepted answer is not valid anymore. Fastclick is used by Foundation now.
Found this on Foundation Github repo when searching for "Fastclick" there:
(From https://github.com/zurb/foundation/search?utf8=%E2%9C%93&q=fastclick)
Also, I found this on Foundation Github repo:
// Enable FastClick if present $(function () { if (typeof FastClick !== 'undefined') { // Don't attach to body if undefined if (typeof document.body !== 'undefined') { FastClick.attach(document.body); } } });(Source from: https://github.com/zurb/foundation/blob/d2c9a9a7e84e53e5eff41ac2f61a8425f0760086/js/foundation/foundation.js)
So, this basically means that you can use Fastclick if you want and Foundation will initialize it for you but you can also decide to exclude if from your libs and Fastclick will not be used.
更多推荐
发布评论