Skip to content

How to correctly set Progress Bar css variable ? #807

Answered by YamiOdymel
jzzxh asked this question in Q&A
Discussion options

You must be logged in to vote

--value 需要指定在 .bar 上,用法類似

document.querySelector(".ts-progress .bar").style.setProperty('--value', 50);

這是考慮到未來可能一個 Progress 會支援多個 .bar 而做的決定

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jzzxh
Comment options

Answer selected by jzzxh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants