在小程序开发用到的文本的两端,需要让这些文字左右对齐 。在模拟器设置的代码
.Text {
text-align: justify;
text-justify: distribute-all-lines;
text-align-last: justify;
}
发现真机模拟显示不正常 再往上找到的 方法 加一个伪元素
.Text {
text-align: justify;
text-justify: distribute-all-lines;
text-align-last: justify;
}
.Text::after{
content: '';
width: 100%;
display: inline-block;
height: 100%;
line-height: 0;
}