1
是否有可能讓typed.js與fontawesome一起使用,以便它可以例如鍵入一個Twitter圖標?Typed.js和Fontawesome
是否有可能讓typed.js與fontawesome一起使用,以便它可以例如鍵入一個Twitter圖標?Typed.js和Fontawesome
你有沒有試過這個?
小提琴:https://jsfiddle.net/4L9a8z5w/
代碼:
$(".element").typed({
strings: ["<i class='fa fa-camera' /> is prohibited <i class='fa fa-ban'></i><i class='fa fa-camera' /> is prohibited <i class='fa fa-ban'></i><i class='fa fa-camera' /> is prohibited <i class='fa fa-ban'></i><i class='fa fa-camera' /> is prohibited <i class='fa fa-ban'></i><i class='fa fa-camera' /> is prohibited <i class='fa fa-ban'></i><i class='fa fa-camera' /> is prohibited <i class='fa fa-ban'></i><i class='fa fa-camera' /> is prohibited <i class='fa fa-ban'></i><i class='fa fa-camera' /> is prohibited <i class='fa fa-ban'></i>"],
typeSpeed: 0,
contentType: 'html'
})
必須設置的contentType爲 'HTML' 這樣fontawesome可以工作。
另一個很好的問題!給予好評。 –