1 Star 0 Fork 5K

seashell / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
layout-description.md 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
mamingshuai 提交于 2021-06-02 01:00 . update OpenHarmony 2.0 Canary

Layout Description

In the JS UI framework, the basic page width is 720 logical pixels. For example, if you set the element width to 100 pixels, the element is displayed on 200 physical pixels in width on a screen whose width is 1440 physical pixels.

Basic page elements include title, text, and image areas. Each basic element may contain multiple sub-elements. You can add components such as buttons, switches, and progress bars as required. When setting the layout, you need to consider the following for each basic element:

  • Size and arrangement
  • Overlapped with another element
  • Alignment, padding, and margin
  • Sub-elements and their positions
  • Container components and their types

You can disassemble elements on the page first and then implement them in sequence. This reduces visual confusion and logical conflicts caused by element nesting and improves code readability for easier modification. The following figure is used as an example.

Figure 1 Page layout

Figure 2 Layout of the comment area

1
https://gitee.com/luquick/docs.git
git@gitee.com:luquick/docs.git
luquick
docs
docs
master

搜索帮助