1
respuesta

P3_1.7-La cara de Creeper

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <canvas width="600" height="400"></canvas>
    <script>

        var pantalla= document.querySelector("canvas");
        var pincel =pantalla.getContext("2d");

        pincel.fillStyle = "darkgreen";
        pincel.fillRect(0,0,350,300);//Creeper´s head

        pincel.fillStyle = "black";
        pincel.fillRect(45,45,90,90);//Creeper´s left eye
        pincel.fillRect(205,45,90,90);//Creeper´s right eye
        pincel.fillRect(135,135,70,100);//Creeper´s nose
        pincel.fillRect(95,190,40,110);//Creeper´s lefth mouth part
        pincel.fillRect(205,190,40,110);//Creeper´s right mouth part
    </script>
</body>
</html>
1 respuesta

Hola Gustavo

Gracias por compartir tu código, está muy bien felicitaciones.

Si tienes alguna pregunta sobre el contenido de los cursos, estaremos aquí para ayudarte.

Si este post te ayudó, por favor, marca como solucionado ✓. Continúa con tus estudios