Cita:
Iniciado por lemmy2011 Hola a tod@s!!!!
Estoy utilizando CANVAs con HTML5 y me funciona correctamente en IE y en Firefox. En cambio, ......
Que versión de Google Chrome estás usando? Ya que a mi me funciona, se ve bien los recuadro de colores, tanto en firefox, como en Chrome.
PD: Intenta poner la próxima vez tu código HTML con las etiquetas [*HTML]
Código HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
</head>
<body>
<canvas width="400" height="400" id="micanvas">Su navegador no soporta canvas :( </canvas>
<script>
var canvas = document.getElementById("micanvas");
var ctx = canvas.getContext("2d");
// Dibujamos en el canvas
ctx.fillStyle = "rgb(255,0,0)";
ctx.fillRect(20,20,100,100);
ctx.fillStyle = "rgb(0,255,0)";
ctx.fillRect(60,60,140,140);
ctx.fillStyle = "rgb(0,0,255)";
ctx.fillRect(100,100,180,180);
</script>
<canvas width="400" height="400" id="micanvas2">Su navegador no soporta canvas :( </canvas>
<script>
var canvas = document.getElementById("micanvas2");
var ctx = canvas.getContext("2d");
// Dibujamos en el canvas
ctx.fillStyle = "rgb(255,0,0)";
ctx.fillRect(20,20,100,100);
ctx.fillStyle = "rgb(0,255,0)";
ctx.fillRect(60,60,140,140);
ctx.fillStyle = "rgb(0,0,255)";
ctx.fillRect(100,100,180,180);
</script>
<canvas width="400" height="400" id="micanvas3">Su navegador no soporta canvas :( </canvas>
<script>
var canvas = document.getElementById("micanvas3");
var ctx = canvas.getContext("2d");
var img = new Image();
img.src = "./imagen.png";
ctx.drawImage(img, 0, 0);
</script>
</body>
</html>