文本/链接

Autotyperjs 打字机动画特效插件

阿里云


autotyperjs 是一款打字机动画特效 js 插件 js。使用 autotyperjs 可以轻松的实现控制台打字效果,配合 CSS3 动画,可以制作漂亮的自动打字动画特效。

使用方法

在页面中引入下面的文件。

HTML 结构

  1. <div>
  2.   <h1 class="typer-target">
  3.     AutoTyper<span>.js</span>
  4.   </h1>
  5. </div>
也想出现在这里?联系我们
创客主机

初始化插件

  1. var options = {
  2.   selector: ".content > h1",
  3.   words: ["hello", "world"]
  4. };
  5.  
  6. // start auto typer
  7. var typer = new autoTyper(options);
  8. typer.start();

停止打字动画

  1. // stop autoTyper
  2. typer.stop();

光标闪烁动画

  1. <div class="typerTarget"></div>
  1. @-webkit-keyframes blink-caret {
  2.   50% {
  3.     border-color: transparent;
  4.   }
  5. }
  6.  
  7. .typerTarget {
  8.   border-right: 1px solid #404145;
  9.   -webkit-animation: blink-caret 0.5s step-end infinite alternate;
  10.           animation: blink-caret 0.5s step-end infinite alternate;
  11. }

配置参数

  1. // available custom options
  2. var options = {
  3.   selector: ".typerTarget", // target element selector
  4.   words: [], // words/sentences that will be auto typed
  5.   charSpeed: 85, // letter typing animation speed
  6.   delay: 2100, // word/sentence typing animation delay
  7.   loop: true, // if loop is activated, autoTyper will start over
  8.   flipflop: true // if flipflop is activated, letters which are typed animated will be removed ony by one animated
  9. };

Github 网址:https://github.com/hsynlms/autotyperjs

Autotyperjs 打字机动画特效插件

已有 421 人购买
  • a6tw
查看演示升级 VIP立刻购买

演示地址 下载地址
收藏
(0)

发表回复

热销模板

Ashade - 作品展示摄影相册WordPress汉化主题
LensNews

本站承接 WordPress / PbootCMS / DedeCMS 等
系统建站、仿站、开发、定制等业务!