I am new in CSS animation and I have three different words and want change them every 3 seconds. That's ok, but I also want change it "smoothly" from left to right. If exists only pure CSS solution, its plus.
Here is my basic html (block is diplay: block
)
<div class="rotating-text-first block">
<span id="rotating-text" class="block">
</span>
</div>
and css - its not working properly
.rotating-text-first {
overflow: hidden;
animation: floatText 5s linear infinite;
}
#rotating-text::before {
content: '';
animation: spin 5s linear infinite;
}
@keyframes spin {
0% {
content: 'WEB';
}
33% {
content: 'E-SHOP';
}
66% {
content: 'APLIKACE';
}
}
@keyframes floatText {
0% {
max-width: 0%;
}
32.9% {
max-width: 50%;
}
33% {
max-width: 0%;
}
65.9% {
max-width: 50%;
}
66% {
max-width: 0%;
}
99.9% {
max-width: 50%;
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…