当前位置:网站首页>小程序- 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;
边栏推荐
- Learning to use livedata and ViewModel will make it easier for you to write business
- MySQL Replication中的并行复制示例详解
- Professor Li Zexiang, Hong Kong University of science and technology: I'm wrong. Why is engineering consciousness more important than the best university?
- 陈宇(Aqua)-安全-&gt;云安全-&gt;多云安全
- Meta enlarge again! VR new model posted on CVPR oral: read and understand voice like a human
- JVM有哪些类加载机制?
- Analysis report on production and marketing demand and investment forecast of global and Chinese diamond powder industry Ⓤ 2022 ~ 2027
- 【241. 为运算表达式设计优先级】
- Leetcode question 1: sum of two numbers (3 languages)
- [machine learning] VAE variational self encoder learning notes
猜你喜欢

龙蜥社区开源 coolbpf,BPF 程序开发效率提升百倍

Build a vc2010 development environment and create a tutorial of "realizing Tetris game in C language"

Content Audit Technology

简单的两个圆球loading加载

焱融看 | 混合云时代下,如何制定多云策略
Example code of second kill based on MySQL optimistic lock

8 popular recommended style layout

Cs5268 advantages replace ag9321mcq typec multi in one docking station scheme

04-Redis源码数据结构之字典

面试题目总结(1) https中间人攻击,ConcurrentHashMap的原理 ,serialVersionUID常量,redis单线程,
随机推荐
内容审计技术
Spark source code reading outline
Research Report on China's software outsourcing industry investment strategy and the 14th five year plan Ⓡ 2022 ~ 2028
2.15 summary
启动solr报错The stack size specified is too small,Specify at least 328k
Google Earth Engine(GEE)——全球人类居住区网格数据 1975-1990-2000-2014 (P2016)
Detailed explanation of leetcode reconstruction binary tree [easy to understand]
Terminal identification technology and management technology
Listen in the network
网络中的listen
Content Audit Technology
04-Redis源码数据结构之字典
一文读懂TDengine的窗口查询功能
龙蜥社区开源 coolbpf,BPF 程序开发效率提升百倍
北斗通信模块 北斗gps模块 北斗通信终端DTU
Flutter SQLite使用
终端识别技术和管理技术
Global and Chinese polypropylene industry prospect analysis and market demand forecast report Ⓝ 2022 ~ 2027
SAP 智能机器人流程自动化(iRPA)解决方案分享
Svg diamond style code