media-feature

Any pointer — CSS reference

Tests accuracy among all available pointing devices. Both coarse and fine can match simultaneously if different devices are available. The none value means no pointing device is available.

Formal Syntax & Structure

css syntaxcss
@media (any-pointer: fine) { /* conditional declarations */ }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>any-pointer</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}@media (any-pointer: fine) {#a{color:rgb(0,100,0)}}</style><body><main id="a">Resize the viewport to explore this example.</main></body></html>
CSS Reference