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!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
setShadowin the canvas context. You can see it here in action.