Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

114
Views
HTML Canvas Graphics Some things not working

This Text is a dummy plz avoid this. plz focus on last line on this paragraph. Thank you Note: Always specify an id attribute (to be referred to in a script), and a width and height attribute to define the size of the canvas. To add a border, use the style attribute.

HTML Canvas Graphics This code does not work for me, anyone can solve this error.

<html>

<body>

<canvas id="myCanvas" width="200" height="100" style="border:1px solid #d3d3d3;">
            Your browser does not support the HTML canvas tag.</canvas>

<script>


var c = document.getElementById("myCanva");
var ctx = c.getContext("2d");

 
var grd = ctx.createRadialGradient(75,50,5,90,60,100);
grd.addColorStop(0,"red");
grd.addColorStop(1,"white");


ctx.fillStyle = grd;
ctx.fillRect(10,10,150,80);


</script>


</body>

</html>
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

i think this is because the canvas id that you call myCanvas is not the same as your getElementById, and that has the id myCanva. i am sure this is not intentional and it works on my end if you change myCanva to myCanvas.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!