Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lideo/f2884161b2d1b3f85e0f6e93f92cb0ed to your computer and use it in GitHub Desktop.
Save lideo/f2884161b2d1b3f85e0f6e93f92cb0ed to your computer and use it in GitHub Desktop.
CSS: testing hover and pointer features
<!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>
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