< view class = "section" >
< view class = "section__title" >flex-direction: row</ view >
< view class = "flex-wrp" style = "flex-direction:row;" >
< view class = "flex-item bc_green" >1</ view >
< view class = "flex-item bc_red" >2</ view >
< view class = "flex-item bc_blue" >3</ view >
</ view >
</ view >
< view class = "section" >
< view class = "section__title" >flex-direction: column</ view >
< view class = "flex-wrp" style = "height: 300px;flex-direction:column;" >
< view class = "flex-item bc_green" >1</ view >
< view class = "flex-item bc_red" >2</ view >
< view class = "flex-item bc_blue" >3</ view >
</ view >
</ view >
|
今天遇到了,一开始字体总是偏下,检查后是因为默认行高的值太大了,将行高设置小一点解决问题
模拟器好使,但在真机上总是略微偏上,不知别人有木有遇到
谢谢,好了!
.flex-item {
text-align
:
center
;
line-height
:
200
rpx;
height
:
200
rpx;
}