Detecting that the browser has no mouse and is touch-only

前端 未结 24 1982
终归单人心
终归单人心 2020-11-27 09:35

I\'m developing a webapp (not a website with pages of interesting text) with a very different interface for touch (your finger hides the screen when you click) and mouse (re

24条回答
  •  难免孤独
    2020-11-27 10:01

    Have a look at modenizr one of its features is touch

    http://modernizr.com/docs/#features-misc

    While I've not tested fully it seems to work very well

    Also this is linked from the modernizr page http://www.html5rocks.com/en/mobile/touchandmouse/

提交回复
热议问题