var x = 0;
function move() {
if(x == 0) {
var box = document.querySelector(".box");
box.style.transition = "1s linear";
box.style.top = "200px";
box.style.opacity = "1";
}
else if(x == 1) {
var box2 = document.querySelector(".box2");
box2.style.transition = "1s linear";
box2.style.top = "200px";
box2.style.opacity = "1";
}
else if(x == 2) {
var box3 = document.querySelector(".box3");
box3.style.transition = "1s linear";
box3.style.top = "200px";
box3.style.opacity = "1";
}
else {
}
x++;
console.log(x);
window.addEventListener("transitionend", move);
}
window.addEventListener("load", move);
var x = 0;
function move() {
if(x == 0) {
var box = document.querySelector(".box");
box.style.transition = "1s linear";
box.style.top = "200px";
box.style.opacity = "1";
}
else if(x == 1) {
var box2 = document.querySelector(".box2");
box2.style.transition = "1s linear";
box2.style.top = "200px";
box2.style.opacity = "1";
}
else if(x == 2) {
var box3 = document.querySelector(".box3");
box3.style.transition = "1s linear";
box3.style.top = "200px";
box3.style.opacity = "1";
}
else {
}
x++;
console.log(x);
window.addEventListener("transitionend", move);
}
window.addEventListener("load", move);