https://github.com/leaysgur/type-write.js
Display texts with typing effect like typewriter.
https://github.com/leaysgur/type-write.js
Last synced: 4 months ago
JSON representation
Display texts with typing effect like typewriter.
- Host: GitHub
- URL: https://github.com/leaysgur/type-write.js
- Owner: leaysgur
- Created: 2014-07-14T15:36:08.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-02-15T07:36:20.000Z (over 5 years ago)
- Last Synced: 2025-01-25T17:44:08.873Z (5 months ago)
- Language: JavaScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
type-write.js
===============
See https://leader22.github.io/type-write.js/## 使い方
上記のデモと同じファイルがindex.htmlなので、そっち見るほうがはやいかも。
```javascript
var typeWrite = new TypeWrite({
textElm: outputElm
});typeWrite.start(targetText, {
talkDelay: 0.05
}, callback);
```## 独自タグの書式
```
あのイーハトーヴォのすきとおった風、{|}
夏でも底に冷たさをもつ{}そら、{|}
うつくしい{}で飾られたモリーオ市、郊外のぎらぎらひかる草の{}。
```という文字は、以下のHTMLとして出力されます。
```html
あのイーハトーヴォのすきとおった風、
夏でも底に冷たさをもつ青いそら、
うつくしい森で飾られたモリーオ市、郊外のぎらぎらひかる草の波。
```※見やすさのために改行してます。
### 注意
- 言わずもがな、事前にCSSの定義が必要です
- ``{}``のネストはできません