https://www.w3.org/TR/mediaqueries-4/ https://css-tricks.com/touch-devices-not-judged-size/
Created
April 9, 2019 08:49
-
-
Save lideo/f2884161b2d1b3f85e0f6e93f92cb0ed to your computer and use it in GitHub Desktop.
CSS: testing hover and pointer features
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Pointer detection test</title> | |
</head> | |
<body> | |
<h1>Hover me... if you can</h1> | |
</body> | |
</html> |
This file contains hidden or 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
h1 { | |
cursor: pointer; | |
} | |
h1:hover { | |
color: red; | |
} | |
h1:after { | |
content: '\2191'; | |
margin-left: .5em; | |
} | |
@media (hover: none) and (pointer: coarse) { | |
h1:after { | |
content: '\274C'; | |
margin-left: .5em; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment