Already looked here-- LINK
I'm trying to get the black background on my canvas to be semi-transparent, but this attempt --
context.fillStyle = "rgba(0, 0, 200, 0.5)";
-- didn't seem to change anything.
Already looked here-- LINK
I'm trying to get the black background on my canvas to be semi-transparent, but this attempt --
context.fillStyle = "rgba(0, 0, 200, 0.5)";
-- didn't seem to change anything.
It looks like your css rule #canvas
is not getting applied.
In your javascript, you create a tag canvas
but don't assign an id to it. Try assigning an id="canvas"
and your #canvas { opacity:0.4; }
will get applied.
canvas = document.createElement("canvas");
canvas.id="canvas";