Nikolay
Nikolay

Reputation: 165

How can I draw a black shadow in webkit browsers?

How can I draw a BLACK shadow in webkit browsers with the HTML5 canvas?

Upvotes: 0

Views: 353

Answers (3)

user704730
user704730

Reputation: 1

shadowColor = "rgb(255,100,100)";

See an example here.

Upvotes: 0

Andrei
Andrei

Reputation: 26

I found the problem! Webkit does not how to process shadow when blur is not set or set to zero. In this case it shows shadow in the same color as the text. Firefox shows it correctly in both case (blur not set or blur equal zero).

Upvotes: 1

Simon Sarris
Simon Sarris

Reputation: 63850

On Canvas?

It should be the same as any other browser:

ctx.shadowColor = "rgba(0, 0, 0, 1)";

See an example here:

http://jsfiddle.net/LpvFF/4/

Tested on Safari 5 and Chrome 12

Upvotes: 0

Related Questions