ant-design/components/progress/demo/gradient-line.md
2019-04-08 21:45:32 +08:00

41 lines
641 B
Markdown

---
order: 11
title:
zh-CN: 自定义进度条渐变色
en-US: Custom line gradient
---
## zh-CN
`linear-gradient` 的封装。推荐只传两种颜色。
## en-US
A package of `linear-gradient`. It is recommended to only pass two colors.
````jsx
import { Progress } from 'antd';
const Demo = () => (
<div>
<Progress
strokeColor={{
'0%': '#108ee9',
'100%': '#87d068',
}}
percent={99.9}
/>
<Progress
strokeColor={{
from: '#108ee9',
to: '#87d068',
}}
percent={99.9}
status="active"
/>
</div>
);
ReactDOM.render(<Demo />, mountNode);
````