0
点赞
收藏
分享

微信扫一扫

笔记:Android 应用启动流程

自由的美人鱼 2023-09-17 阅读 48

uni-app 之 元素常用属性

<view
style="
display: flex; 定义父元素为flex;
flex-direction:row; 表示横向布局
flex-direction:column; 纵向排序,不设置的话默认是横向的
align-items:center; 子元素上下居中
justify-content:center; 子元素左右居中">

display属性声明使用flexbox模式布局;
flex-direction属性声明使用横向布局还是纵向布局,
row表示横向布局,column表示纵向布局;

flex-wrap属性定义当元素宽度超出容器宽度时应该怎么做,
nowrap表示不换行,wrap表示换行。

<text style="width:20%;">地址</text>
<text style="width:60%; text-align:center;文字居中">请输入关键字</text>
<text style="width:20%; text-align:center;">消息</text>

style="font-weight:bold;字体加粗"
color: 文字颜色。
font-size: 文字大小。
font-weight:bold; 字体粗细。
font-style: 字体样式。
line-height: 行高。
text-decoration:underline; 文字下划线。
text-align: 文字对齐方式。

Text 限制字数行数,用省略号...代替
-webkit-line-clamp: 2; 设置为两行。当文本内容超过两行时,将会自动隐藏多余的部分

举报

相关推荐

0 条评论