Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 HTML5 和 CSS 创建一个移动网站。如何适应不同的设备?基于设备类型(使用 navigator.userAgent 的 android/ios/windows/bb)或基于屏幕宽度(使用媒体查询)。
哪种做法最好并且会很有效?
我需要在设备上运行我的网站,如下所示:
哪种方法最好?
当前的最佳实践是一种称为响应式设计的策略。它会调整网站以匹配浏览器的宽度。
查看链接