Chrome 开发人员工具不会更改站点

Chrome developer tool doesn't change the site

我在使用 Google Chrome 开发人员工具时遇到了这个非常奇怪的问题,当我尝试更换设备时它“看起来”只是缩小了。

当我最小化浏览器 window 并手动将其变小时,它工作正常,如下图所示:

css变了,一切都很好。

然而,当我使用开发者工具将其更改为移动设备时,实际上什么也没有发生:

为什么会这样?

我使用的是版本86.0.420.111

您需要在 <head> 标签内的代码中添加以下内容。

<meta name="viewport" content="width=device-width, user-scalable=no">

没有它,页面将无法在移动设备上响应。

More info