提交 dc05c6c5 编写于 作者: DCloud-yinjiacheng's avatar DCloud-yinjiacheng

更新CSS示例

上级 bb0764e8
...@@ -3,15 +3,16 @@ ...@@ -3,15 +3,16 @@
<view style="height: 250px;padding: 0 30px; background-color: gray;justify-content: center;"> <view style="height: 250px;padding: 0 30px; background-color: gray;justify-content: center;">
<view class="margin-bottom-10"> <view class="margin-bottom-10">
<text class="font-weight-bold">text-overflow:clip white-space:nowrap</text> <text class="font-weight-bold">text-overflow:clip white-space:nowrap</text>
<text class="font-size-20" style="text-overflow: clip;white-space: nowrap;">{{text}}</text> <text class="font-size-20" style="text-overflow: clip;white-space: nowrap;">{{multiLineText}}</text>
</view> </view>
<view class="margin-bottom-10"> <view class="margin-bottom-10">
<text class="font-weight-bold">text-overflow:ellipsis white-space:nowrap</text> <text class="font-weight-bold">text-overflow:ellipsis white-space:nowrap</text>
<text class="font-size-20" style="text-overflow: ellipsis;white-space: nowrap;">{{text}}</text> <text class="font-size-20" style="text-overflow: ellipsis;white-space: nowrap;">{{singleLineText}}</text>
<text class="font-size-20" style="text-overflow: ellipsis;white-space: nowrap;">{{multiLineText}}</text>
</view> </view>
<view class="margin-bottom-10"> <view class="margin-bottom-10">
<text class="font-weight-bold">white-space:normal</text> <text class="font-weight-bold">white-space:normal</text>
<text class="font-size-20" style="white-space: normal;">{{text}}</text> <text class="font-size-20" style="white-space: normal;">{{multiLineText}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -21,7 +22,8 @@ ...@@ -21,7 +22,8 @@
export default { export default {
data() { data() {
return { return {
text: 'HBuilderX,轻巧、极速,极客编辑器;uni-app x,终极跨平台方案;uts,大一统语言' multiLineText: 'HBuilderX,轻巧、极速,极客编辑器;uni-app x,终极跨平台方案;uts,大一统语言',
singleLineText: 'uts,大一统语言(单行文本)'
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册