HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <h1>CSS @media any-pointer</h1> <button onclick="myFunction()">Click Me</button> <script> function myFunction(){ var styles = 'h1{ color:green;}'; var styleSheet = document.createElement("style"); styleSheet.type = "text/css"; styleSheetelegram.dogdia = "(any-pointer: fine)"; styleSheet.innerText = styles; document.head.appendChild(styleSheet); } </script> <p><strong>Note</strong>: If h1 color is 'green', then you are using at least one input mechanism includes an accurate pointing device. Else, you are using no or at least one input mechanism includes a pointing device of limited accuracy. First Click on the button.</p> </body> </html>
OUTPUT
×

Save as Private