当前位置:网站首页>小程序- view中多个text换行
小程序- view中多个text换行
2022-07-01 13:25:00 【西京刀客】
view中多个text换行
小程序想在view中写几个不同的text,然后发现不能很好的换行,默认好像是从左到右依次排列。
解决:
需要在view中定义一个class就可以解决问题,需要设置的是dispaly=flex;
<view class="tview">
<text style="font-size:50rpx;">one</text>
<text style="font-size:40rpx;">two</text>
<text style="font-size:30rpx;">three</text>
</view>
acss/wxss文件中的代码
.tview{
display: flex;
flex-direction: column;
}
小程序之view,text换行
小程序之view,text换行
样式:
view换行:white-space:pre-line;
text换行:word-break:break-all;
边栏推荐
- Arthas use
- La taille de la pile spécifiée est petite, spécifiée à la sortie 328k
- 1553B environment construction
- 10. Page layout, guess you like it
- Report on the 14th five year plan and future development trend of China's integrated circuit packaging industry Ⓓ 2022 ~ 2028
- Listen in the network
- ArrayList扩容机制以及线程安全性
- Simple two ball loading
- 6. Wiper part
- Asp.netcore利用dynamic简化数据库访问
猜你喜欢

French Data Protection Agency: using Google Analytics or violating gdpr

The stack size specified is too small, specify at least 328k

minimum spanning tree

1553B environment construction

9. Use of better scroll and ref

Computer network interview knowledge points

流量管理技术

MySQL 66 questions, 20000 words + 50 pictures in detail! Necessary for review

【机器学习】VAE变分自编码器学习笔记

La taille de la pile spécifiée est petite, spécifiée à la sortie 328k
随机推荐
Jenkins+webhooks- multi branch parametric construction-
[241. Design priority for operation expression]
Declare an abstract class vehicle, which contains the private variable numofwheel and the public functions vehicle (int), horn (), setnumofwheel (int) and getnumofwheel (). Subclass mot
学会使用LiveData和ViewModel,我相信会让你在写业务时变得轻松
What is the future development direction of people with ordinary education, appearance and family background? The career planning after 00 has been made clear
Yarn restart applications record recovery
10. Page layout, guess you like it
Spark source code reading outline
6年技术迭代,阿里全球化出海&合规的挑战和探索
The stack size specified is too small, specify at least 328k
A Fletter version of Notepad
孔松(信通院)-数字化时代云安全能力建设及趋势
JS discolored Lego building blocks
MySQL报错1040Too many connections的原因以及解决方案
Report on the current situation and development trend of bidirectional polypropylene composite film industry in the world and China Ⓟ 2022 ~ 2028
1553B environment construction
Investment analysis and prospect prediction report of global and Chinese dimethyl sulfoxide industry Ⓦ 2022 ~ 2028
Introduction to topological sorting
Analysis report on the development trend and prospect scale of silicon intermediary industry in the world and China Ⓩ 2022 ~ 2027
20个实用的 TypeScript 单行代码汇总