我会制作批量打字效果,例如 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 制作批量文字效果?
最佳答案
关于javascript - TypedJs批量打字效果不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49266806/