ant-design/components/progress/demo/linecap.md

27 lines
739 B
Markdown
Raw Normal View History

---
order: 10
title:
zh-CN: 边缘形状
en-US: Stroke Linecap
---
## zh-CN
通过设定 `strokeLinecap="butt"` 可以调整进度条边缘的形状为方形,详见 [stroke-linecap](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap)。
## en-US
By setting `strokeLinecap="butt"`, you can change the linecaps from `round` to `butt`, see [stroke-linecap](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap) for more information.
2019-05-07 14:57:32 +08:00
```jsx
import { Progress } from 'antd';
export default () => (
<>
<Progress strokeLinecap="butt" percent={75} />
<Progress strokeLinecap="butt" type="circle" percent={75} />
<Progress strokeLinecap="butt" type="dashboard" percent={75} />
</>
2018-11-28 15:00:03 +08:00
);
2019-05-07 14:57:32 +08:00
```