Home > Web Front-end > JS Tutorial > body text

Detailed explanation of how to write newline spaces (multiple spaces) in WeChat mini programs_javascript skills

无忌哥哥
Release: 2018-07-12 14:06:40
Original
3125 people have browsed it

This article mainly introduces the detailed explanation of how to write line breaks (multiple spaces) in WeChat mini programs. It is very good and has certain reference value. Friends in need can refer to it

HTML in mini programs The web page entity cannot be used normally. The writing method in the mini program is:

1. Space, line break

Hello! \tJuly is on fire! \nI am on the next line

\t Space (only one space will be displayed if multiple)
\n Line break

2. Continuous spaces

<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>
Copy after login

Friendly reminder: Must be in the tag!

The above is the detailed content of Detailed explanation of how to write newline spaces (multiple spaces) in WeChat mini programs_javascript skills. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!