N
N
nepster-web2015-12-09 17:07:20
JavaScript
nepster-web, 2015-12-09 17:07:20

Is it possible to style canvas elements?

I need to implement a countdown timer in the form of a circle: https://jsfiddle.net/6swo8dec/
Having rummaged around on the Internet, I was able to implement something similar, but unfortunately I am very poorly familiar with canvas, so I did not quite understand whether it is possible to style circular stripe via css?
Actually set her color, shadow, etc. not through js, but through classes. How can I do that ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GreatRash, 2015-12-09
@nepster-web

canvas is a stupid picture, a set of multi-colored pixels. Only the canvas (DOM element) can be styled, not its content. It's like trying to style the content of an img .
Get better at SVG, it suits you better.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question