## 需求描述 之前在网页中检查用户浏览器是桌面端还是移动端时,用的都是 JS 检查 useragent 的方式。 最近在想有没有方法能够通过 CSS 来区分,于是研究了一下: - 关键词:`css media query mobile` - [Responsive Web Design - Media Queries](https://www.w3schools.com/css/css_rwd_mediaqueries.asp) - [Media Queries: How to target desktop, tablet, and mobile?](https://stackoverflow.com/questions/6370690/media-queries-how-to-target-desktop-tablet-and-mobile) - 关键词:`css desktop mobile` - [gokulkrishh / media-query.css](https://gist.github.com/gokulkrishh/242e68d1ee94ad05f488)
需求描述
之前在网页中检查用户浏览器是桌面端还是移动端时,用的都是 JS 检查 useragent 的方式。
最近在想有没有方法能够通过 CSS 来区分,于是研究了一下:
关键词:
css media query mobileResponsive Web Design - Media Queries
Media Queries: How to target desktop, tablet, and mobile?
关键词:
css desktop mobilegokulkrishh / media-query.css