1
resposta

Bandeira da Bahia

Esse código ficou sensacional!

<body style="background:black; color:white; font-family:monospace">
    <h1 align="justify">Bandeira da Bahia</h1>

  <canvas width="600" height="400"></canvas>

<script>

    var tela = document.querySelector('canvas');
    var pincel = tela.getContext('2d');

    pincel.fillStyle = 'lightgrey';
    pincel.fillRect(0, 0, 600, 400);


    pincel.fillStyle = 'white';
    pincel.fillRect(0, 0, 600, 100);

    pincel.fillStyle = 'red';
    pincel.fillRect(0, 100, 600, 100);

    pincel.fillStyle = 'white';
    pincel.fillRect(0, 200, 600, 100);

    pincel.fillStyle = 'red';
    pincel.fillRect(0, 300, 600, 100);

    pincel.fillStyle = 'blue';
    pincel.fillRect(0, 0, 200, 200);

    pincel.fillStyle = 'white';
    pincel.beginPath();
    pincel.moveTo(95, 10);
    pincel.lineTo(15, 175);
    pincel.lineTo(175, 175);
    pincel.fill();
  </script>

</body>
1 resposta

Olá, Higo! Tudo bem por aí?

Mandou bem.

Caso tenha ficado com alguma dúvida não deixe de compartilhar com a gente.

Continue praticando.

Bons estudos e até mais!

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software