提交 62cb6853 编写于 作者: DCloud_iOS_XHY's avatar DCloud_iOS_XHY

css text 组件增加动态设置 line-height 示例

上级 92e5a95c
......@@ -2,7 +2,7 @@
<view style="flex-grow: 1;">
<view style="height: 500px;background-color: gray;justify-content: center;align-items: center;">
<text class="common" style="line-height: 75px;">line-height: 75px</text>
<text class="common" style="line-height: 3;">line-height: 3</text>
<text class="common line-height-3">line-height: 3</text>
<text class="common" style="line-height: 3em;">line-height: 3em</text>
<text class="common" style="line-height: 3;">line-height: 3\nline-height: 3\nline-height: 3</text>
</view>
......@@ -20,4 +20,7 @@
margin: 10px 0;
padding: 0 10px;
}
.line-height-3 {
line-height: 3;
}
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册