web文本居中
以下是文本居中代码
点击查看代码
height: 150px;
line-height: 150px;
text-align: center;
实现单文本垂直居中就是将line-height的高度与行高一样 运行代码
点击查看代码
hello
多行文本居中
点击查看代码
height: 120px;
display: flex;
align-items: center;
justify-content: center;
运行代码
点击查看代码
hello
hello
浙公网安备 33010602011771号