1.0.1 • Published 3 years ago
typer-text v1.0.1
typer-text
Live Demo
Install
npm install typer-text --save
# iife
<script src="index.browser.js"></script>
Usage
// esm 方式
import TyperText from 'typer-text'
// script标签引入方式
const TyperText = window['typer-text']
// 初始化
const Typer = new TyperText({
el: '#target',
spee: 300,
text: '文本',
loop: true,
startIndex: 1,
fontSize: '24px',
color: 'tomato'
})
// 开始渲染
Typer.render();