2016-04-22 66 views

回答

0

你有沒有試過這個?

小提琴: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可以工作。