Answer the question
In order to leave comments, you need to log in
How to download mobile/desktop version of css (choose one)?
Please tell me how to fix this situation:
At the beginning of the page loading (html), you need to choose: a mobile device, or not (the width of the screen will be enough). Then download the appropriate css file. Here's how I did it:
<head>
<link rel='stylesheet' type='text/css' href='m.Main.css' media="all and (max-width:750px)"/>
<link rel='stylesheet' type='text/css' href='Main.css' media="all and (min-width:751px)"/>
</head>
Answer the question
In order to leave comments, you need to log in
Media queries cannot be done, since the browser loads all the styles, but already applies them in place. In general, it is good practice to use the backend to determine from which device the request came from and substitute the appropriate style, but in this case there is a risk of loading the wrong style file. To operate exactly with the width, it is only in js to write a script directly into the head that will friend this or that file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question