First, you need to make sure your animation is set to loop. Use the keyword infinite
as your animation-timing-function for that.
Second, we can restructure your animation to happen in one reusable keyframe sequence that shows and hides the element. By making the whole animation 4 seconds long and offsetting it by half of that (2 seconds) on one element, we achieve a seamless loop of the two elements fading in and out:
.parent {
position: relative;
}
.parent p {
animation: show 4s infinite;
position: absolute;
top: 0;
left: 0;
}
.parent p:last-child {
animation-delay: -2s;
}
@keyframes show {
0%, 50%, 100% {
opacity: 0;
}
10%, 40% {
opacity: 1;
}
}
<div class="parent">
<p>0% interest free credit</p>
<p>free delivery</p>
</div>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…