Viewport 接口
🌐 Viewport interface
语法
🌐 Signature
export interface Viewport
属性
🌐 Properties
|
属性 🌐 Property |
修饰符 🌐 Modifiers |
类型 🌐 Type |
描述 🌐 Description |
默认 🌐 Default |
|---|---|---|---|---|
|
deviceScaleFactor |
|
number |
指定设备缩放因子。更多信息请参见 devicePixelRatio。 🌐 Specify device scale factor. See devicePixelRatio for more info. 附注 将此值设置为 🌐 Setting this value to |
|
|
hasTouch |
|
boolean |
指定视口是否支持触摸事件。 🌐 Specify if the viewport supports touch events. |
|
|
height |
number |
以 CSS 像素为单位的页面高度。 🌐 The page height in CSS pixels. 附注 将此值设置为 🌐 Setting this value to | ||
|
isLandscape |
|
boolean |
指定视口是否处于横向模式。 🌐 Specifies if the viewport is in landscape mode. |
|
|
isMobile |
|
boolean |
是否考虑了 🌐 Whether the |
|
|
width |
number |
以 CSS 像素为单位的页面宽度。 🌐 The page width in CSS pixels. 附注 将此值设置为 🌐 Setting this value to |