<div id="notAnimation">
Not Animation
</div>
<div id="onAnimation">
Animation
</div>
div {
padding: 10px;
margin: 20px;
}
#notAnimation {
}
#onAnimation {
animation: scale 10s ease-in-out;
}
@keyframes scale {
0% {
transform: scale(1);
opacity: 1;
color: black;
}
50% {
transform: scale(0.95);
opacity: 0.4;
color: red;
}
100% {
transform: scale(1);
opacity: 1;
color: black;
}
}
var el1 = document.getElementById("notAnimation");
console.log(window.getComputedStyle(el1)["animationName"]);
var el2 = document.getElementById("onAnimation");
console.log(window.getComputedStyle(el2)["animationName"]);
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.