android - chrome 模拟设备的 Oneplus 6 视口(viewport)大小

标签 android google-chrome google-chrome-devtools web-testing

我想在 Google Chrome 的模拟设备列表中将 OnePlus 6 添加为自定义设备,但我找不到:

  • 设备像素比
  • 用户代理字符串

Missing params for device pixel ratio & user agent for oneplus 6 emeulated device in chrome

最佳答案

有关更多信息,您可以查看 this page .

根据该页面:

  • width x height: 568x320
  • Device pixel ratio: 2.6252

但是对于用户代理,他们列出了很多。我使用的是:

  • User agent string: Mozilla/5.0 (Linux; Android 9; ONEPLUS A6000 Build/PKQ1.180716.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/70.0.3538.64 Mobile Safari/537.36

关于android - chrome 模拟设备的 Oneplus 6 视口(viewport)大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51950254/

相关文章:

javascript - 更改 chrome 应用程序窗口位置,但不是来自 main.js

javascript - addEventListener ("beforeload") 缺少事件

javascript - Chrome 开发工具脚本注入(inject)可以在页面重新加载后继续存在

android - 从 Firebase 数据库中删除特定值

android - 如何有效地刷新 ListFragment?

android - 使用 Android Studio 的补丁支持库

google-chrome - 如何允许 Google Chrome 插件以网页方式访问文件

google-chrome-devtools - 远程设备面板发生了什么变化?

user-interface - 如何使用开发工具查看 Google Chrome 扩展注入(inject)的 css 样式表?

java - TextureView 不断收到 SIGSEGV 11