我会在页面末尾产生类似于这个例子的批量输入效果。
export class AProposComponent implements OnInit {
@ViewChild('text', { read: ElementRef }) text: ElementRef
constructor() {}
ngOnInit() {
let textEl = this.text.nativeElement
let typed = new Typed(textEl, {
strings: ['npm install...^1000<br> `installing components...` ^1000 <br> `Fetching from source...`'],
typeSpeed: 40,
backSpeed: 0,
loop: true
})
}
}我得到了一个正常的打字效果(如第一个例子)
npm install...
`installing components...`
`Fetching from source...`如何使用Typesjs实现批量类型的效果?
发布于 2018-03-14 00:33:11
https://stackoverflow.com/questions/49266806
复制相似问题