I run Google Chrome on my full size laptop (Win 7), my cell phone (Android), and a rather small Dell netbook (Win XP). Certain sites will always open the full webpage on the laptop and a special mobile version on the cell phone.
Because the netbook screen is about the same shape as a large tablet, I would like to configure Chrome on the netbook to automatically call for the mobile version.
Can I get this result with some kind of script??
答案 0 :(得分:1)
您可以使用navigator.userAgent
属性,或只使用window.innerWidth
和window.innerHeight
导航到指定大小或PPI密度的移动版本。
答案 1 :(得分:1)
如果您想要在每个页面中呈现平板电脑设备或其他相关尺寸,请使用Chrome控制台,请按以下步骤操作: