body {
margin: 20px;
font-family: 'Lato';
font-weight: 300;
font-size: 1.2em;
text-align: center;
}
button {
background: orange;
color: white;
margin: 5px;
padding: 10px;
border-radius: 4px;
font-family: 'Lato';
cursor: pointer;
border: none;
outline: none;
}
button:hover {
background: blue;
}
.square {
pointer-events: none;
position: relative;
width: 80px;
height: 80px;
background-color: black;
margin: 16px;
display: inline-block;
}
.controls {
margin-top: 300px;
}
var indiParam = anime({
targets: '.square',
translateY: {
value: 250
},
rotate: {
value: '2.125turn'
},
backgroundColor: {
value: 'rgb(255,0,0)',
duration: 400,
delay: 1500,
easing: 'linear'
},
duration: 1500,
autoplay: false
});
document.querySelector('.play-indi').onclick = indiParam.restart;