<div class='button slider slide-in'></div>
div {
height: 100px;
width: 100px;
background-color: red;
}
/* Transition */
.button {
transition: background-color 0.6s ease;
}
/* Animation */
@keyframes slide-in {
from {
transform: translateX(-80%);
}
to {
transform: translateX(1);
}
}
.slider {
animation: slide-in 5s ease-in-out;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.