博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
微信小程序view居中
阅读量:4609 次
发布时间:2019-06-09

本文共 525 字,大约阅读时间需要 1 分钟。

.wxml
<view class='text_align' >水平居中</view>
<view class='line_height' >垂直居中</view>
<view class='center' >水平居中||垂直居中</view>
.wxss
.text_align{
width: 350rpx;
height: 350rpx;
background-color: gray;
text-align: center; /** 水平居中 **/
}
.line_height{
width: 350rpx;
height: 350rpx;
background-color: orange;
line-height: 350rpx; /** 垂直居中 **/
}
.center{
width: 350rpx;
height: 350rpx;
background-color: brown;
line-height: 350rpx; /** 垂直居中 **/
text-align: center; /** 水平居中 **/
}

转载于:https://www.cnblogs.com/lsyy2017/p/11461551.html

你可能感兴趣的文章
unshift()与shift()
查看>>
使用 NPOI 、aspose实现execl模板公式计算
查看>>
行为型模式:中介者模式
查看>>
How to Notify Command to evaluate in mvvmlight
查看>>
33. Search in Rotated Sorted Array
查看>>
461. Hamming Distance
查看>>
Python垃圾回收机制详解
查看>>
jquery 编程的最佳实践
查看>>
MeetMe
查看>>
IP报文格式及各字段意义
查看>>
(转载)rabbitmq与springboot的安装与集成
查看>>
C2. Power Transmission (Hard Edition)(线段相交)
查看>>
STM32F0使用LL库实现SHT70通讯
查看>>
Atitit. Xss 漏洞的原理and应用xss木马
查看>>
MySQL源码 数据结构array
查看>>
(文件过多时)删除目录下全部文件
查看>>
T-SQL函数总结
查看>>
python 序列:列表
查看>>
web移动端
查看>>
pythonchallenge闯关 第13题
查看>>