最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Faking max-device-width - Stack Overflow

programmeradmin1浏览0评论

To implement mobile website it would be useful to set max-device-width in my browser. I know plugins to fake the user-agent. It this also possible for the max-device-width? I would prefer to use a regular browser like Firefox, IE, Opera, ... instead of all kind of mobile browser emulators or even different smartphones.

Thanks, Ropo

To implement mobile website it would be useful to set max-device-width in my browser. I know plugins to fake the user-agent. It this also possible for the max-device-width? I would prefer to use a regular browser like Firefox, IE, Opera, ... instead of all kind of mobile browser emulators or even different smartphones.

Thanks, Ropo

Share Improve this question asked May 27, 2011 at 7:24 roporopo 1,4962 gold badges18 silver badges29 bronze badges 1
  • relevant: jonhiggins.co.uk/words/max-device-width – That Brazilian Guy Commented Feb 19, 2014 at 15:31
Add a comment  | 

2 Answers 2

Reset to default 15

Chrome allows you to set device metrics, which are used in the media queries calculation for device width. To do that, open Developer Tools, click the gear icon on the lower right corner, and go to the Overrides tab.

Edit Jan. 17, 2014: Chrome now has an Emulation tab, that can be found alongside Console, in Developer Tools.

In the common case desktop browsers can be used for sanity checks of html & css, but mobile browsers are very different in the html, css and javascript processing.

To "emulate" max-device-width you can replace max-device-width with max-width and resize your browser window to required size (actual versions of browsers supports max-width media-query instruction).

We use desktop browsers at the early stages of mobile web interface development and emulators in late. UI testers use real devices only.

发布评论

评论列表(0)

  1. 暂无评论