giggle
This commit is contained in:
parent
07a026e93f
commit
6138fcf640
@ -1,17 +1,12 @@
|
|||||||
var c = 255
|
var x = 0, y = 0;
|
||||||
var x = 0
|
|
||||||
function b() {
|
|
||||||
c -= 1;
|
|
||||||
document.body.style.backgroundColor = 'rgb(' + c + ',' + c + ',' + c + ')';
|
|
||||||
}
|
|
||||||
function m() {
|
function m() {
|
||||||
x += 0.7
|
x += (Math.random() >= 0.4 ? 1 : -1 ) * (Math.random() * 5);
|
||||||
|
y += (Math.random() >= 0.4 ? 1 : -1 ) * (Math.random() * 5);
|
||||||
s = document.getElementById('search');
|
s = document.getElementById('search');
|
||||||
s.style.left = x + 'px'
|
s.style.left = x;
|
||||||
s.style.top = x + 'px'
|
s.style.top = y;
|
||||||
}
|
}
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
// setInterval(b, 500);
|
|
||||||
setInterval(m, 200);
|
setInterval(m, 200);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user