[mw_shl_code=css,true] <!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8" /> <title>Martrix</title> <style> kere { marginaal: 0; pehmendus: 0; Taustavärv: #000; ülevoola: peidetud; värv:#e6922a; } </style> </head> <body> <canvas id="canvas"></canvas>
<script type="text/javascript"> var canvas = document.getElementById("canvas"), kontekst = canvas.getContext("2d");
var fontSize = 12, listText = "abcdefghijklmnopqrstuvwxyz ".split(""), veerg, rida, listColumn = [];
function draw() { Joonistada taust context.fillStyle = "rgba(0, 0, 0, 0.05)"; context.fillRect(0, 0, canvas.width, canvas.height); context.save();
Joonista logo context.shadowColor = "#074425"; context.shadowBlur = parseInt(Math.random() * 40 + 1); context.font = "paksus 36px Arial"; context.fillStyle = "#eefbf5"; context.fillText("ITSVSE.COM", (canvas.width / 2 - context.measureText("ITSVSE.COM").width / 2), canvas.height - 200); context.fillText ("Wusoft Forum", (canvas.width / 2 - context.measureText("Wusoft Forum").width / 2), canvas.height - 165); context.font = "16px Microsoft Yahei"; context.fillText ("Maatriks: Maatriksi revolutsioon", (canvas.width / 2 - context.measureText ("Maatriks: Maatriksi revolutsioon").width / 2), canvas.height - 100);
Joonistuskood context.restore(); context.font = "normaalne" + fontSize + "px Arial"; context.fillStyle = "#12ee46"; for (var i = 0; I < veerg; i++) { if (Math.random() > 0.5) { var str = listText[parseInt(Math.random() * listText.length)]; context.fillText(str, i * fontSize, listColumn* fontSize); listVeerg+= 1; if (listColumn>= rida) { listVeerg= 0; } } } }
function resize() { canvas.width = window.innerWidth - 3; canvas.height = window.innerHeight - 3;
column = canvas.width / fontSize, rida = lõuend.kõrgus / fontSize;
for (var i = 0; I < veerg; i++) { listVeerg= 1; } }
window.addEventListener("resize", resize);
canvas.addEventListener("mousedown", function () { clearInterval (taimer); taimer = setInterval (viig, 20); });
canvas.addEventListener("mouseup", function () { clearInterval (taimer); taimer = setInterval(draw, 40); });
resize(); var taimer = setInterval(draw, 40);
</script> </body> [/</html>mw_shl_code]
|