Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to set canvas on background html

document.body.style.background = "url(" + canvas.toDataURL() + ")";
To actually set this as the background, you can take advantage of the canvas element's toDataURL method which will create an image from your canvas, which you can set as the src of an image or a background
Source by filosophy.org #
 
PREVIOUS NEXT
Tagged: #set #canvas #background #html
ADD COMMENT
Topic
Name
8+8 =