<el-row justify="end"> <el-col style="font-size: 13px"> 打印日期:{{ printValue.printTime }}</el-col > </el-row>如何让文本竖向居中
时间: 2024-02-14 09:05:28 浏览: 142
grid-cheatsheet:CSS网格备忘单
要让文本竖向居中,可以使用`display: flex`和`justify-content: center`属性来实现。具体地,在`<el-col>`标签上添加以下样式即可:
```
display: flex;
justify-content: center;
flex-direction: column;
```
这样就可以让文本在竖直方向上居中显示。完整的代码如下:
```
<el-row justify="end">
<el-col style="font-size: 13px; display: flex; justify-content: center; flex-direction: column;">
打印日期:{{ printValue.printTime }}
</el-col>
</el-row>
```
阅读全文