Last active
February 3, 2021 10:30
-
-
Save freewayspb/808f8afd34dc6acde97113d35d6538aa to your computer and use it in GitHub Desktop.
css detect device, custom styles for touch and non touch devices example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* smartphones, touchscreens */ | |
@media (hover: none) and (pointer: coarse) { | |
/* ... */ | |
} | |
/* stylus-based screens */ | |
@media (hover: none) and (pointer: fine) { | |
/* ... */ | |
} | |
/* Nintendo Wii controller, Microsoft Kinect */ | |
@media (hover: hover) and (pointer: coarse) { | |
/* ... */ | |
} | |
/* mouse, touch pad */ | |
@media (hover: hover) and (pointer: fine) { | |
/* ... */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment