HTML5 Canvas Elements styling?

I want to style the canvas elements (like filltext etc) which I have drawn on canvas.

For example, I want text to have inside shadow. (i think it is called inset!)

Is there any way to style elements within canvas.. using CSS3?

Thanks!

Answers


Nope. Css is applied to dom elements, while the "elements within canvas" do not exist in the document object model. They are just simple image data.

But, You can always use the native js function setShadow in the canvas context. You can see it here in action.


Need Your Help

Can't find element to make if statement

python python-3.x selenium if-statement selenium-webdriver

Can't find certain element exists I would like to put into if statement: (EDIT)

Python: arguments for using itertools to split a list into groups

python

This is a question about the relative merits of fast code that uses the standard library but is obscure (at least to me) versus a hand-rolled alternative. In this thread (and others that it duplic...