var zeit=0.2;
var wurfel=50;
for (a = 1; a <= 80; a++) {
document.getElementById('load').innerHTML += '<div id="lauf'+a+'" class="lauf"style="position: absolute;border: 1 solid black;margin: 0;width: '+wurfel+'px;height: '+wurfel+'px;borderRadius:0%;"></div>'
}
var breite =$(window).width();
var hohe =$(window).height();
e=breite/100;
f=hohe/e;//prozent hohe
console.log(breite+'-'+hohe)
console.log(e+'-'+f)
k=breite/50;
g=k.toFixed(0);//menge wurfel
p=hohe/50;
h=p.toFixed(0);// menge hohe
var allewurfel=g*2+h*2;
secbreite=g*zeit;
sechohe=h*zeit;
zeitalles=secbreite*2+sechohe*2;// kompltett zeit
var j=zeitalles.toFixed(3)
console.log(secbreite+'-'+sechohe)
var bb=breite-wurfel;
var hh=hohe-wurfel;
var proobenseite=hh+bb;//oben und seite gleich 100 prozent
var prohunder =proobenseite/100;
var untenpro=bb/prohunder/2;
var seitepro=hh/prohunder/2;
var oo=untenpro.toFixed(2);
var ss=seitepro.toFixed(2);
$(".lauf").playKeyframe({
name: 'spin',
duration:j+'s',
timingFunction: 'linear',
//fillMode: 'running',
iterationCount:'infinite'});
for (i = 1; i <= allewurfel; i++) {
var ia=i*zeit;
$("#lauf" + i).css("animation-delay", ia + "s");
}
var o0 = '0%';
var o25='25%';//25%
var o50='50%';//50%
var o75='75%';//75%
var o100='100%';//100%
var kf = {
name:'spin'
};
kf[o0] = {
'top':'0px',
'background-color':'red',
'left':'0px'
};
kf[o25] = {
'background-color': 'yellow',
'top': '0px',
'left': bb+'px',
};
kf[o50] = {
'background-color': 'blue',
'top': hh+'px',
'left': bb+'px',
};
kf[o75] = {
'top':hh+'px',
'background-color':'green',
'left':'0px'
};
kf[o100] = {
'top':'0px',
'background-color':'red',
'left':'0px'
};
$.keyframe.define([kf]);
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.