Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProgressCircle 进度圈能否有渐变色 #6447

Closed
TangDeYu opened this issue Nov 22, 2023 · 1 comment
Closed

ProgressCircle 进度圈能否有渐变色 #6447

TangDeYu opened this issue Nov 22, 2023 · 1 comment
Labels

Comments

@TangDeYu
Copy link

TangDeYu commented Nov 22, 2023

Version of antd-mobile

5.33.0

能否像ProgressBar 进度条一样使用渐变色
<ProgressBar
percent={70}
style={{
'--fill-color':
'linear-gradient(to right, var(--adm-color-primary), var(--adm-color-success))',
}}
/>

ProgressCircle组件设置不生效

@1587315093
Copy link
Contributor

ProgressCircle的颜色是 svg stroke 写的

CSS Stroke 不支持渐变效果。这是因为 CSS Stroke 主要用于定义图形元素的轮廓线样式,而不是填充样式。因此,无法使用渐变效果来改变图形元素的边框线条样式。

这里有个canvas 支持渐变的,希望对你有用
https://codepen.io/miaoduanwang/pen/vpgYBB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants