今天遇到了,一开始字体总是偏下,检查后是因为默认行高的值太大了,将行高设置小一点解决问题[图片]
请问 view 里面的字体如何上下左右居中[图片] [代码]<[代码][代码]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[代码][代码]>[代码]
2022-08-03套了层view,也得在这层view上加 -webkit-transform:rotate(0deg); transform: translateY(0);
swiper设置圆角在真机上不显示在模拟器中的效果: [图片] 在真机上面的效果: [图片]
2021-10-13