HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> @media (any-pointer: none){ h1{ color: black; } } @media (any-pointer: coarse){ h1{ color: blue; } } @media (any-pointer: fine){ h1{ color: green; } } </style> </head> <body> <h1>CSS @media any-pointer</h1> <p><strong>Note</strong>: Check the following.</p> <ul> <li>If h1 color is 'black', then you are using no pointing device</li> <li>If h1 color is 'blue', then you are using at least one input mechanism includes a pointing device of limited accuracy.</li> <li>If h1 color is 'green', then you are using at least one input mechanism includes an accurate pointing device.</li> </ul> </body> </html>
OUTPUT
×

Save as Private