True mobile screen emulator ?

梦想与她 提交于 2019-12-08 05:48:18

问题


I have this page :

http://people.opera.com/andreasb/viewport/ex01.html

Which uses viewport for different mobile screen sizes.

When I run this at my iphone I do see the font changes :

But when I use Ripple or other chrome extensions (which I found) , it doesnt show me the increased font size. only screen size is changing. ( but it doesnt affect the font size )

How can I emulate ( chrome extension) the screen size so it will show me as if I'm on real mobile ?


回答1:


You don't need a Chrome extension for that, the developer tools already have such a built-in feature.

  1. Open the developer tools (F12, CtrlShiftI, ...).
  2. Click on the gear in the bottom-right corner.
  3. Click on "Overrides".
  4. Enable "Device metrics", and adjust the "Screen resolution" / "Font scale factor" to your desired values.

Examples (360x200 and 200x360, I didn't zoom or resize the screenshots):

Some preset values can be used by switching the user agent (above "Device metrics"). If you want multiple custom values, create a Chrome extension using the chrome.debugger API.



来源:https://stackoverflow.com/questions/15896883/true-mobile-screen-emulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!