在小程序中HTML的网页实体无法正常使用,小程序中的写法为:
一、空格,换行
你好!\t123!\n我在下一行
\t 空格( 多个只会显示一个空格)
\n 换行
二、连续空格
<view>
<text space="ensp">你好 啊 哈哈哈(空格是中文字符一半大小)</text>
</view>
<view>
<text space="emsp">你好 啊 哈哈哈(空格是中文字符大小)</text>
</view>
<view>
<text space="nbsp">你好 啊 哈哈哈(空格根据字体设置)</text>
</view>
<view>
<text decode="{{true}}">你好 啊 哈哈哈(空格是中文字符一半大小)</text>
</view>
<view>
<text decode="{{true}}">你好 啊 哈哈哈(空格是中文字符大小)</text>
</view>
<view>
<text decode="{{true}}">你好 啊 哈哈哈(空格根据字体设置)</text>
</view>
友情提示:必须在标签中!