How to make the web page support both mobile and computer versions in the mobile phone?

visiting github, with a mobile browser displays the mobile page and desktop version

at the bottom.

after clicking, the computer version of the web page will be displayed, and mobile version

will be displayed at the top.

the test found that there will be a mobile_reference in the middle

could you tell me how to implement this scheme?

Mar.10,2021

you can tell whether it is a mobile device or a pc device by navigator.userAgent .
in css , you can use @ madia to write styles for mobile devices or PC devices.


css media query


1, flexible layout, through css to achieve adaptive layout
2, can be made into two sets of programs, and then through js to determine that the request head is distributed to the project directory that does not understand

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e99374-173c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e99374-173c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?