4

I'm trying to use Chrome's Dev Tools to emulate a standard rendering of a webpage on numerous mobile devices. However, when attempting to emulate devices with smaller screen resolutions than the width of the page I'm trying to render, I'm only seeing what would effectively happen if I just reduced the size of my desktop browser's window by dragging its edges.

I understand that that's useful but the experience I'm looking to test is how the page will look when the mobile device displays a zoomed out view of the site to fit the screen (this is typically what you see on mobile devices when a webpage isn't configured with viewport meta tags and/or CSS media queries).

Is there any way to achieve emulation of this default zooming behavior with Chrome's Dev Tools?

isherwood
  • 58,414
  • 16
  • 114
  • 157
Funktr0n
  • 1,711
  • 2
  • 16
  • 23

2 Answers2

1

If you mean with non 'responsive sites with no viewport' to be rescaled to the default viewport of the device to get an idea of what the rescaling looks like, you can more or less reproduce it visually, yes.

Click on 'Screen' to do a custom emulation. And manually enter your target pixel display width and height sizes as 'Resolution'. Say 320 x 480 for an iPhone target.

Then enter a 'Device pixel ratio' that is: 1 / your-fixed-width * device-width e.g. 0.3125 % for a fixed-width-design of 1024px to a 320px iPhone resolution target width.

It will fit your fixed-layout in a contained viewport accordingly, which you can manually rescale arbitrarily by changing your browser window size, or by moving the Chrome inspector bar up and down.

Fonts won't be as crisp and clear as a real device but that should give you an accurate visual layout.

hexalys
  • 5,177
  • 3
  • 31
  • 56
0

To emulate a viewport larger than your current one, Inspect the page (in a Chromium browser, right-click on a page element and select Inspect or use Ctrl+Shift+C shortcut on Windows or Command+Shift+C on Mac), then select the Viewports (Command+Shift+M on Mac) or click the icon as highlighted below. Choose Desktop from the dropdown at top of image and select 50% or other zoom. You can then resize the nested viewport using the highlighted draggable edges.

Screenshot of emulating a larger viewport

Reggie Pinkham
  • 11,985
  • 4
  • 38
  • 36