Looking for feedback on my code to animate/colorify the div when clicking the 'Animate' button. Any suggestions or additional code are welcome!
This is how my code currently looks:
.anime {
animation: coloranimate 5s;
width: 100px;
height: 100px;
border: 1px solid black;
background: red;
}
@keyframes coloranimate {
from {
background: green;
}
to {
background: yellow;
border: 4px solid black;
}
}
@-webkit-keyframes coloranimate {
from {
background: green;
}
to {
background: yellow;
border: 4px solid black;
}
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="anime" class="anime">
</div>
<button>Animate</button>
My goal is to add animation and color changes to the div by simply clicking the 'Animate' button.