Quantcast
Channel: Media query to detect if device is touchscreen - Stack Overflow
Viewing all articles
Browse latest Browse all 15

Answer by aleksa_95 for Media query to detect if device is touchscreen

$
0
0

This will work. If it doesn't let me know

@media (hover: none) and (pointer: coarse) {    /* Touch screen device style goes here */}

hover:none is true when hover is not supported

pointer:coarse is true when the input is of limited accuracy.

If all you want to do is to control hover, then you dont need to use pointer.

edit: hover on-demand is not supported anymore


Viewing all articles
Browse latest Browse all 15

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>