<html>
<head>
<title>PHP中文网</title>
<meta charset=
"utf-8"
>
<script src=
"http://www.jq22.com/jquery/jquery-1.10.2.js"
></script>
<script>
$(document).ready(
function
() {
var
s = window.screen;
var
width = q.width = s.width;
var
height = q.height;
var
yPositions = Array(300).join(0).split('');
var
ctx = q.getContext('2d');
var
draw =
function
() {
ctx.fillStyle = 'rgba(0,0,0,.05)';
ctx.fillRect(0, 0, width, height);
ctx.fillStyle = 'green';
ctx.font = '10pt Georgia';
yPositions.map(
function
(y, index) {
text = String.fromCharCode(1e2 + Math.random() * 330);
x = (index * 10) + 10;
q.getContext('2d').fillText(text, x, y);
if
(y > Math.random() * 1e4) {
yPositions[index] = 0;
}
else
{
yPositions[index] = y + 10;
}
});
};
RunMatrix();
function
RunMatrix() {
Game_Interval = setInterval(draw,30);
}
});
</script>
</head>
<body>
<div align=
"center"
style=
" position:fixed; left:0; top:0px; width:100%; height:100%;"
>
<canvas id=
"q"
width=
"1440"
height=
"900"
></canvas>
</div>
</body>
</html>