Επεξεργασία

Κοινή χρήση μέσω


Simulate device orientation with the Sensors tool

Simulate different device orientations from within DevTools.

  1. Press Ctrl+Shift+P (Windows, Linux) or Command+Shift+P (macOS) to open the Command Menu.

    The Command Menu

  2. Type sensors, select Show Sensors, and then press Enter. The Sensors tool opens in the bottom of the DevTools window.

    Show Sensors from Command Menu

  3. From the Orientation list, select one of the preset orientations, such as Portrait upside down, or select Custom orientation to provide your own exact orientation.

    Selecting 'Portrait upside down' from the Orientation list

If you select Custom orientation, the alpha, beta, and gamma rotational axis fields are enabled.

You can also set a custom orientation by dragging the Orientation Model. For example, to rotate along the alpha axis, press and hold Shift before dragging:

The Orientation Model

Note

Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons Attribution 4.0 International License. The original page is found here and is authored by Kayce Basques (Technical Writer, Chrome DevTools & Lighthouse).

Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 International License.