while making a website that is only for desktop, and while viewing it on mobile I want an alert from browser to show that "not viewable in mobile!" I have tried the following-
script {
display: none;
pointer-events: none;
}
but these didn't work even tried by putting class and script inside a div and then giving class and more. always the alert is showing at desktop view also!! is there anyway possible?
<script>is alreadydisplay: none;by default. There is no CSS property that affects<script>execution. That use case seems strange anyway. You mention media queries, so why not create a responsive design that works for both mobile and desktop? What is the difficulty with mobile? Seems like an XY problem.