This is an automated email from the ASF dual-hosted git repository. kyork pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex-site.git
The following commit(s) were added to refs/heads/master by this push: new 8609743 * [doc] Update doc for line-height. (#229) 8609743 is described below commit 86097431dedffe9645c622d25394650db458207d Author: YorkShen <shenyua...@gmail.com> AuthorDate: Tue Dec 11 18:11:48 2018 +0800 * [doc] Update doc for line-height. (#229) --- source/cn/wiki/text-styles.md | 1 + source/wiki/text-styles.md | 1 + 2 files changed, 2 insertions(+) diff --git a/source/cn/wiki/text-styles.md b/source/cn/wiki/text-styles.md index 89a5d84..4a66ad7 100644 --- a/source/cn/wiki/text-styles.md +++ b/source/cn/wiki/text-styles.md @@ -34,6 +34,7 @@ version: 2.1 * `text-overflow {string}`:设置内容超长时的省略样式。可选值 `clip` | `ellipsis` >> 只有 `<text>`和`<richtext>`组件支持。 * `lines {number}`: 正整数,指定最大文本行数,默认值为0,表示不限制最大行数。如果文本不够长,实际展示行数会小于指定行数。 +* `line-height {length}`:正整数,每行文字高度。`line-height`是 top 至 bottom 的距离。![line-height](http://i.stack.imgur.com/LwZJF.png)`line-height`与`font-size`没有关系,因为`line-height`被 top 和 bottom 所限制,`font-size` 被 glyph 所解析。`line-height`和`font-size`相等一般会导致文字被截断。 ## 其它参考 - [颜色关键字列表](./color-names.html)。 diff --git a/source/wiki/text-styles.md b/source/wiki/text-styles.md index 1cb5c8d..40592f1 100644 --- a/source/wiki/text-styles.md +++ b/source/wiki/text-styles.md @@ -39,6 +39,7 @@ Text alike components share some common style rules. The text alike components c - `text-overflow`:<enum> `clip` | `ellipsis`. This property determines how overflowed content that is not displayed is signaled to users. It can be clipped, display an ellipsis. >> Only support for `<text>` and `<ricthext>` - `lines`: <number> positive number. This is the max lines of text that would be displayed, the default value is 0 which means there is no restriction on text lines. If the text is not enough, the actual number of line may be shorter than the specified value. +- `line-height`: <length> The line height of every line in the text. `line-height` is the space between top and bottom.![line-height](http://i.stack.imgur.com/LwZJF.png) There is no relationship between `line-height` and `font-size`, as `line-height` is restricted by top and bottom, `font-size` is interpreted by glyph. Usually but not always, `line-height` and `font-size` with the same value will cause the text clipped. ## Note * [The list of color keywords.](./color-names.html)