mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 14:47:35 +00:00
Base: Move all the HTML test content into /res/html/misc
This commit is contained in:
parent
4720635aab
commit
de12cf6821
58 changed files with 1 additions and 1 deletions
39
Base/res/html/misc/canvas.html
Normal file
39
Base/res/html/misc/canvas.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Canvas 2D test!</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #000;
|
||||
color: #fff; /* another css comment */
|
||||
}
|
||||
canvas {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #fff;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
ctx = document.getElementById("foo").getContext("2d");
|
||||
|
||||
var width = 200;
|
||||
var height = 100;
|
||||
for (var i = 0; i < 2; i++)
|
||||
{
|
||||
ctx.fillStyle = 'red';
|
||||
ctx.fillRect(10, 10, width, height);
|
||||
|
||||
ctx.strokeStyle = 'blue';
|
||||
ctx.strokeRect(10, 10, width, height);
|
||||
|
||||
ctx.scale(0.5, 0.5);
|
||||
ctx.translate(10 + width * 2, 10 + height * 2);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body link="#44f" vlink="#c4c" background="90s-bg.png">
|
||||
<canvas id="foo" width="300" height="200"></canvas>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue