Typing Animation as Placeholder

时间:2016-04-04 17:02:56

标签: animation placeholder typing

A perfect example of this technique can be seen on the https://www.inwx.de/en site. Here the input field with the titel "Find your desired domain" shows an typing effect as a placeholder, where text is typed and deleted. I wanted to ask where to start to build this effect. I couldn't find something on the internet about this "effect". ;)

1 个答案:

答案 0 :(得分:1)

试试这个:typing.js

下载文件并将其链接到您的HTML文件后,您只需设置var isPlaceholder = true;并将文字放在var strings = new Array("www.yourdomain.com")中。

像这样:

<input id="words" type="text" name="domain" value="" placeholder="">  
<script>
  var strings = new Array("www.yourdomain.com")
  var typingSpeed = 100;
  var deleteSpeed = 40;
  var isLoop = true;
  var isPlaceholder = true;
</script>

如果你正在使用它,请告诉我! 我很乐意看到它。