I am trying to make a background to my website with a canvas. The code is here: http://jsfiddle.net/uXJMA/. The gradient is showing up, but the repeating image is not. Can anyone help me figure out why the image isn’t working?
Share
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.
Original ——— this doesn’t answer the question
Honestly I know very little about canvas, but assuming the image you are adding looks like static, try adding document.body.appendChild(canvas);
http://jsfiddle.net/hyperthalamus/sWYHM/
never saw that object being added to the DOM, so it’s worth a try?
Revised
What you need is -webkit-canvas(mycanvas);
there’s an example here:
http://www.webkit.org/blog/176/css-canvas-drawing/
I made a working version here:
http://jsfiddle.net/hyperthalamus/vwRyt/