Element: progress百分比文字显示自定义述求

Created on 1 Dec 2016  ·  3Comments  ·  Source: ElemeFE/element

ElementUI version

1.0.3

OS/Browers version

Win0/Chrome 53

Vue version

2.1.3

需要实现的效果:
image

代码提示:

image

对应的代码:

.el-progress-bar__innerText {
    display: inline-block;
    vertical-align: middle;
    color: #fff;  //这里需要自定义
    font-size: 12px;  //这里需要自定义
    margin: 0 5px;  //这里需要自定义
}
.el-progress-bar__outer {
    height: 6px;
    border-radius: 100px;
    background-color: #e5e9f2;
    overflow: hidden;
    position: relative;
    vertical-align: middle;
}

建议修改方案:

设置“el-progress-bar__outer”的overflow属性为visible
"el-progress-bar__innerText"的style属性为progress的一个属性
这样就可以自定义百分比文字的marignTop,font等样式

Most helpful comment

@saopang 你可以在同一个 .vue 文件里写两个 style 标签,一个带 scoped,一个不带。

All 3 comments

你完全可以通过你的样式来控制

@baiyaaaaa 在vue文件里,如果style里包含了scoped,没办法重置“el-progress-bar__outer”和"el-progress-bar__innerText"的样式

@saopang 你可以在同一个 .vue 文件里写两个 style 标签,一个带 scoped,一个不带。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yubo111 picture yubo111  ·  3Comments

yorululu picture yorululu  ·  3Comments

zhguokai picture zhguokai  ·  3Comments

smallpath picture smallpath  ·  3Comments

Kingwl picture Kingwl  ·  3Comments