Skip to content

DeviceOrientation 继承自: Enum

移动设备支持的物理方向。

示例 ​

移动设备方向配置 ​

请参阅 Page 移动设备方向配置示例, 它演示了如何配合 DeviceOrientation 使用 Page.set_allowed_device_orientations()。

枚举值 ​

名称类型默认值说明
PORTRAIT_UP—'portraitUp'Device held upright in portrait mode.
PORTRAIT_DOWN—'portraitDown'Device held upside-down in portrait mode.
LANDSCAPE_LEFT—'landscapeLeft'Device rotated 90° counter-clockwise (home button or primary edge on the right).
LANDSCAPE_RIGHT—'landscapeRight'Device rotated 90° clockwise (home button or primary edge on the left).

关注我,学习大模型、大数据、Python等热门技术。