html - 在 Vuetify 中将文本对齐到文本字段的中心
问题描述
我有一个显示字符串的只读文本字段。字符串应该从文本字段的左侧开始。我想知道 Vuetify 中是否有办法将字符串与文本字段的中心对齐?
更新 这是我的代码:
<v-text-field
value="Select the configuration:"
color="grey lighten-43"
class="text--darken-3 mt-3 text-xs-center"
outline
readonly
single-line
></v-text-field>
解决方案
如果您使用范围样式,>>>
则必须使用输入字段的深度选择器(即):
<v-text-field
class="centered-input text--darken-3 mt-3"
value="Select the configuration:"
color="grey lighten-43"
outline readonly single-line />
<style scoped>
.centered-input >>> input {
text-align: center
}
</style>
推荐阅读
- objective-c - 如何过滤这个由多个 NSDictionary 组成的 NSArray?
- angular - 为什么选择已选择的选项时未触发更改事件?
- abap - 如何在 SAP 中将多个事务链接到一个事务
- node.js - Hansontable 和 NodeJS
- c# - 如何阅读 HttpResponse 正文?
- python - 如何使我的应用程序几何图形动态更改?
- django - django-import-export 包在导出到 XL 文件时获取外键值
- react-native - 双引号包含,预期用尖括号代替
- python - 我遇到了 SQL 语法错误问题
- swiper - IOS 使用 swiper 在大(超过 50 个)图像上加载失败