Skip to content

Instantly share code, notes, and snippets.

@tankred
Last active February 13, 2024 08:04
Show Gist options
  • Save tankred/4b6b283f89594620a2fe to your computer and use it in GitHub Desktop.
Save tankred/4b6b283f89594620a2fe to your computer and use it in GitHub Desktop.
Alexander Calder
<div class="center">
<canvas id="AlexanderCalder" width="423" height="518"></canvas>
</div>
<!--
HTML5 painting based on:
Artist: Alexander Calder
Untitled
Oil on canvas
https://theartstack.com/artworks/zonder-titel-olieverf
-->
var canvas = document.getElementById('AlexanderCalder');
var context = canvas.getContext('2d');
context.beginPath();
context.rect(0, 421, 74, 5);
context.fillStyle = '#131019';
context.fill();
context.lineWidth = 1;
context.strokeStyle = '#3D3938';
context.stroke();
context.beginPath();
context.rect(200, 149, 69, 10);
context.fillStyle = '#131019';
context.fill();
context.beginPath();
context.rect(268, 0, 70, 518);
context.fillStyle = '#131019';
context.fill();
context.beginPath()
#AlexanderCalder{background:#DDD6C4;border:16px solid #A46518;}
.center {
/* [1] */
position: absolute;
left: 50%;
top: 50%;
/* [2] */
transform: translate(-50%, -50%);
/**/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment