我正在尝试从头开始构建个人网站。在寻找想法时,我发现了一个我喜欢的特定模板:http://phydeve.epizy.com/imozar/index-1.html 我想尝试自己构建所有内容以进行学习,但是有一件事我不知道。如何实现标题下的更改文本(“嗨,我是Norman Doe”下)。我曾尝试使用不同的术语进行多次Google搜索,但找不到解释。
我很好地学习了我可能需要的任何语言/风味。
答案 0 :(得分:2)
我认为该人正在使用一个名为Typer.js的插件 链接:https://steven.codes/typerjs/
使用JS确实有很多方法,但是如果您需要最少的编码,我会使用插件。
<!--Put your words in the DATA-WORDS-->
<h1 style="font-family:sans-serif;">
we are <span
class="typer"
id="some-id"
data-words="sample word,another sample,amaziing"
data-colors="#ed426d,#6d67c6,#b74033"
data-delay="50"
data-loop="1">
</span>
</h1>
<!--Insert at the bottom of your html file-->
<script async src="https://unpkg.com/typer-dot-js@0.1.0/typer.js"></script>