+ 5

How can I make a canvas pattern as the background of the webpage?

12th Mar 2017, 10:56 AM
Chirag Bhansali
Chirag Bhansali - avatar
2 Answers
+ 21
document.body.style.backgroundImage=canvas.toDataURL();
12th Mar 2017, 11:21 AM
Valen.H. ~
Valen.H. ~ - avatar
+ 4
$('body').css("background-image",canvas.toDataURL()); Is the following jQuery interpretation correct?
12th Mar 2017, 12:36 PM
Chirag Bhansali
Chirag Bhansali - avatar