I have the following code where I do an animation in CSS moving a div. But I wanted to also animate the shadow of the text simulating somehow a weight for my text:
div#main {
background-color: #2E2E2E;
}
div#lblCaption {
margin-bottom: 0px;
color: #C7C7C7;}
div#NodeCaptionContainer{
animation-duration: .7s;
animation-name: fadeAndScale;
animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes fadeAndScale {
from {
opacity: 0;
transform: scale(.9, .9);
text-shadow: 0 0 .75px rgb(255, 255, 255), 0 0 .75px rgb(255, 255, 255);
}
to {
opacity: 1;
transform: scale(1, 1);
text-shadow: 0 0 .0px rgb(255, 255, 255), 0 0 .0px rgb(255, 255, 255);
}
}
<div id="main">
<div id="NodeCaptionContainer">
<div id="lblCaption" class="pretty p-default p-thick p-pulse"><p class="noMargin"> Node: 1:9 Type: Function Read: 480B Write: 1088B </p></div>
</div>
</div>
The problem is that the animation for the translation is done smoothly by the animation-timing-function, but not for the shadow. I wanted to also smooth the shadow transition. Is there a way to smooth also the shadow transition in the CSS?