Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

111
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda