我正在寻找一种类型效果,可以定期更改单词并键入不同的单词。一个例子是http://mattfarley.ca/。这正是我想要创造的。如您所见,类型效果会更改单词并键入新单词。我该怎么做。这就是我迄今为止所拥有的。但是我不知道一旦完成后如何使单词发生变化。
.intro-text h1 {
overflow: hidden; /* Ensures the content is not revealed until the animation */
border-right: .15em solid orange; /* The typwriter cursor */
white-space: nowrap; /* Keeps the content on a single line */
margin: 0 auto; /* Gives that scrolling effect as the typing happens */
letter-spacing: .15em; /* Adjust as needed */
animation:
typing 3.5s steps(30, end),
blink-caret .5s step-end 5;
}
/* The typing effect */
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
/* The typewriter cursor effect */
@keyframes blink-caret {
from, to { border-color: transparent }
50% { border-color: orange; }
}