univ.phundrak.fr/js/main.js
Phuntsok Drak-pa 8629c9369f initial commit
2018-09-29 21:47:26 +02:00

20 lines
362 B
JavaScript

window.onload = main;
var d = document;
var de = d.documentElement;
var offset = 0;
function main() {
console.log("JS loaded");
setInterval(frame, 1000.0 / 60.0);
}
function frame() {
if (offset >= (de.clientWidth)) {
offset = -100;
} else {
offset += 3;
}
d.getElementById("carre").style.marginLeft = offset + "px";
}