问题
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.
- Open the developer tools (F12, CtrlShiftI, ...).
- Click on the gear in the bottom-right corner.
- Click on "Overrides".
- 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