# data-view-whr

**声明位置：**

视图容器 DOM 元素，例如：

```markup
<body>
    <div data-view-container data-view-whr="414 / 736">
        <section data-view-id="myView" data-view>
            视图内容
        </section>
    </div>
</body>
```

设置后，当使用 PC设备 在 类横屏模式（窗口宽度大于高度） 下浏览时，View\.js 将页面以 414 \* 736 分辨率（iPhone 8 plus 的分辨率）渲染。此时，视图容器的高度为浏览器窗口的高度，宽度为 `高度 / 736 * 414`，并且水平居中。

有关视图布局的更多信息，点击 [这里](https://doc.view-js.com/main.-shi-tu-bu-ju) 去了解。

**是否必须：**

否。

**属性取值：**

`宽度 / 高度` 。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://attr.view-js.com/data-view-whr.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
