我会在页面末尾进行批量输入效果,例如this example
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制作批量类型效果?
答案 0 :(得分:1)