在我的网站上,我有此问题:
如果设备具有触摸屏,我希望所有页面都是可滚动的。我的网站运行到IE
我尝试在我的主要div上应用touch-action pan-y,但没有结果。
touch-action pan-y
if ('ontouchstart' in document.documentElement) { Document.write("touch device detected"); // Your code else{ Document.write("desktop mode"); } }