Viewport

From Documentation
Revision as of 08:21, 24 October 2023 by Hawk (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Since 6.5.0

Viewport Content

The default viewport content generated in ZK when using tablet device is:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

Customize

Users can specify viewport settings by library properties or XML processing instructions.

Library Properties

Since 6.5.0 The default value of org.zkoss.zul.tablet.meta.viewport.disabled property is false. If it is set to true, ZK won't render viewport content for all pages. Thus, users can specify the viewport on each ZUL page by meta instruction.

XML processing instruction

Users can keep the default setting and assign custom viewport on specific pages by overwriting viewport content in page instruction as follows:

<?page viewport="width=device-width, initial-scale=1.0"?>




Last Update : 2023/10/24

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.