mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-09-06 14:54:30 +00:00
31 lines
647 B
HTML
31 lines
647 B
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
</head>
|
||
|
<style>
|
||
|
html, body {
|
||
|
margin: 0;
|
||
|
}
|
||
|
canvas {
|
||
|
display: block;
|
||
|
}
|
||
|
</style>
|
||
|
<body>
|
||
|
<canvas id="dest" height="100" width="100"></canvas>
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
var sourceWidth = 50;
|
||
|
var sourceHeight = 50;
|
||
|
var destCanvas = document.getElementById('dest');
|
||
|
var destCtx = destCanvas.getContext('2d');
|
||
|
destCtx.fillStyle = "#FF0000";
|
||
|
destCtx.fillRect(0, 0, destCanvas.width, destCanvas.height);
|
||
|
destCtx.fillStyle = "#00FFFF";
|
||
|
destCtx.fillRect(25, 25, sourceWidth, sourceHeight);
|
||
|
destCtx.fillStyle = "#000000";
|
||
|
destCtx.fillRect(30, 30, 40, 40);
|
||
|
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|