I am looking for a solution using WordPress. In my specific case, I want the CSS Animations to take effect only after the page has completely loaded. For example: click here
This is my HTML:
<div class="svg-one">
<svg xmlns="http://www.w3.org/2000/svg" width="467" height="195" viewBox="0 0 467 195" fill="none">
<path
d="M-5.68701 0.4375C-5.68701 0.4375 304.086 30.9591 314.874 120C323.963 194.797 466.079 194.745 466.079 194.745"
stroke="#1A3D96" stroke-width="0.34" stroke-miterlimit="10" stroke-linecap="round" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="468" height="196" viewBox="0 0 468 196" fill="none">
<path
d="M-6.0835 1.08398C-6.0835 1.08398 294.147 28.6178 303.406 117.71C311.193 192.584 467.721 194.851 467.721 194.851"
stroke="#1A3D96" stroke-width="0.34" stroke-miterlimit="10" stroke-linecap="round" />
</svg>
</div>
Here is my CSS:
@keyframes fade-in-left-to-right {
to {
opacity: 1;
stroke-dashoffset: 0;
}
}
.svg-one {
position: absolute;
display: flex;
flex-direction: column;
left: 0;
top: 25%;
width: 14%;
}
.svg-one svg {
position: absolute;
display: block;
width: 23vw;
height: auto;
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
opacity: 0.5;
animation: fade-in-left-to-right 2.5s linear forwards;
animation-delay: 1.2s;
}
.svg-one svg:nth-child(1) {
top: 0px;
}
.svg-one svg:last-child {
top: 70px;
}
Thank you for taking the time to read this. Have a wonderful day!
A function that allows animations to run only after the website has fully loaded.