未验证 提交 19aa273f 编写于 作者: L LiAn 提交者: Gitee

update zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md.

Signed-off-by: NLiAn <lian15@huawei.com>
上级 5cf7687d
...@@ -53,17 +53,16 @@ RichText\(content:string\) ...@@ -53,17 +53,16 @@ RichText\(content:string\)
@Entry @Entry
@Component @Component
struct RichTextExample { struct RichTextExample {
@State data: string = '<h1 style='text-align: center;'>h1标题</h1> @State data: string = "<h1 style='text-align: center;'>h1标题</h1>" +
<h1 style='text-align: center;'><i>h1斜体</i></h1> "<h1 style='text-align: center;'><i>h1斜体</i></h1>" +
<h1 style='text-align: center;'><u>h1下划线</u></h1> "<h1 style='text-align: center;'><u>h1下划线</u></h1>" +
<h2 style='text-align: center;'>h2标题</h2> "<h2 style='text-align: center;'>h2标题</h2>" +
<h3 style='text-align: center;'>h3标题</h3> "<h3 style='text-align: center;'>h3标题</h3>" +
<p style='text-align: center;'>p常规</p><hr/> "<p style='text-align: center;'>p常规</p><hr/>" +
<div style='width: 500px;height: 500px;border: 1px solid;margin: 0auto;'> "<div style='width: 500px;height: 500px;border: 1px solid;margin: 0auto;'>" +
<p style='font-size: 35px;text-align: center;font-weight: bold; color: rgb(24,78,228)'>字体大小35px,行高45px</p> "<p style='font-size: 35px;text-align: center;font-weight: bold; color: rgb(24,78,228)'>字体大小35px,行高45px</p>" +
<p style='background-color: #e5e5e5;line-height: 45px;font-size: 35px;text-indent: 2em;'> "<p style='background-color: #e5e5e5;line-height: 45px;font-size: 35px;text-indent: 2em;'>" +
这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字 "<p>这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字</p>"
这是一段文字</p></div>'
build() { build() {
Flex({direction: FlexDirection.Column,alignItems: ItemAlign.Center, Flex({direction: FlexDirection.Column,alignItems: ItemAlign.Center,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册