1

I want to create a website with responsive design. Now I would not only provide different CSS files for different resolutions. Ideally i will also provide different css files for different input devices. For example: Link should be shown larger for touchscreens, as for devices with mouse.

I can detect resolutions with CSS media querys, is there a way to detect touchscreens or general the type of input device?

4

1 回答 1

3

您可以使用诸如modernizr 之类的库来检测功能(例如触摸),然后基于此应用样式。在这里查看:

http://modernizr.com

于 2013-06-14T09:06:56.177 回答