lsyy2017


.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; /** 水平居中 **/
}

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-10-01
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2021-11-21
猜你喜欢
  • 2022-12-23
  • 2021-12-15
  • 2022-01-16
  • 2022-12-23
  • 2021-04-18
相关资源
相似解决方案