关于 el-steps 修改字体大小不成功

2,122 阅读1分钟

el-tabs 步骤条 字体默认大小为 16px ,想修改它的大小,一般的方法就是修改 .el-tabs__item 的样式就行

原始样式 :

.el-step__title {
  font-size: 16px;
  line-height: 38px;
}

我是这样修改的:

<style scoped>
.el-step__title {
  font-size: 13px;
}
</style>

发现没有效果,然后加了 !important

<style scoped>
.el-step__title {
  font-size: 13px !important;
}
</style>

依然没有用,然后开始各种提升权重值,就是修改不了,最后才发现问题居然是在 scoped

去掉 style 标签的 scoped属性 修改成功

<style>
.el-step__title {
  font-size: 13px ;
}
</style>