As the title said when I tried to animate the stroke-dashoffset and fill at the same time. It has this strange unwanted 3-second delay, but I have both of the animated properties are in one keyframe as shown below
svg {
background-color: black;
stroke-dasharray: 1800;
fill: #fff;
stroke: #fff;
opacity: 10;
animation: reveal 10s cubic-bezier(0, 0.23, 1, 0.1);
animation-delay: 0;
max-width: min(calc(100vw - 10rem), 40rem);
}
@keyframes reveal {
0% {
fill: none;
stroke-dashoffset: 1800;
}
80% {
fill: rgba(255, 255, 255, 0);
}
100% {
fill: rgba(255, 255, 255, 1);
stroke-dashoffset: 0;
}
}
<svg
id="Layer_1"
data-name="Layer 1"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 314.41 79.8"
>
<defs>
<style>
.cls-1 {
font-size: 76px;
font-family: BebasNeue-Regular, Bebas Neue;
}
.cls-2 {
letter-spacing: 0em;
}
.cls-3 {
letter-spacing: 0em;
}
</style>
</defs>
<text class="cls-1" transform="translate(0 64.6)">
Hel
<tspan class="cls-2" x="85.65" y="0">l</tspan>
<tspan class="cls-3" x="111.49" y="0">o World</tspan>
</text>
</svg>
I have attempted research by visiting the following URL:
But still, I haven't got any idea to solve my problem, on the right is my code on jsfiddle https://jsfiddle.net/ju781mb9/
PS. The video is only for placeholder so you got an idea of the website and i also slow the animation down