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>
问题是翻译的动画使用animation-timing-function
平滑进行,但阴影没有。我想也让阴影过渡更加平滑。在CSS中有没有一种方法可以使阴影过渡变得更加平滑?