HTML5 painting based on Untitled by Alexander Calder. Artist: Alexander Calder Title: Untitled src: https://theartstack.com/artworks/zonder-titel-olieverf
Last active
February 13, 2024 08:04
-
-
Save tankred/4b6b283f89594620a2fe to your computer and use it in GitHub Desktop.
Alexander Calder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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