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

更新CSS示例

上级 0adcf0aa
<template> <template>
<view style="flex-grow: 1;"> <view style="flex-grow: 1;">
<view style="height: 250px;background-color: gray;justify-content: center;align-items: center;"> <view style="height: 250px;padding: 0 30px; background-color: gray;justify-content: center;">
<text class="common" style="text-overflow: clip;white-space: normal;">{{text}}</text> <view class="margin-bottom-10">
<text class="common" style="text-overflow: clip;white-space: nowrap;">{{text}}</text> <text class="font-weight-bold">text-overflow:clip white-space:nowrap</text>
<text class="common" style="text-overflow: ellipsis;white-space: nowrap;">{{text}}</text> <text class="font-size-20" style="text-overflow: clip;white-space: nowrap;">{{text}}</text>
</view>
<view class="margin-bottom-10">
<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>
</view>
<view class="margin-bottom-10">
<text class="font-weight-bold">white-space:normal</text>
<text class="font-size-20" style="white-space: normal;">{{text}}</text>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -19,9 +28,15 @@ ...@@ -19,9 +28,15 @@
</script> </script>
<style> <style>
.common { .font-size-20 {
width: 250px;
height: 30px;
font-size: 20px; font-size: 20px;
} }
.font-weight-bold {
font-weight: bold;
}
.margin-bottom-10 {
margin-bottom: 10px;
}
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册