Element UI Input 文本居中显示方法
要让文本居中,可以在 el-input 上添加一个 class,并设置该 class 的 text-align 属性为 center。
例如:
<el-input v-model='query.oid' readonly class='centered-text'></el-input>
然后在 CSS 中定义 centered-text 类:
.centered-text {
text-align: center;
}
这样就可以使 el-input 中的文本居中显示了。
原文地址: https://www.cveoy.top/t/topic/qz1C 著作权归作者所有。请勿转载和采集!